<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Connecting to SPDS (SAS Scalable Performance Data Server) from Python in Architecture</title>
    <link>https://communities.sas.com/t5/Architecture/Connecting-to-SPDS-SAS-Scalable-Performance-Data-Server-from/m-p/811651#M375</link>
    <description>&lt;P&gt;Did you follow all these steps?&amp;nbsp;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/spdsug/p0d2bbuq1jkfnun1ksjw86cy5kfn.htm" target="_blank"&gt;https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/spdsug/p0d2bbuq1jkfnun1ksjw86cy5kfn.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 05 May 2022 12:38:16 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2022-05-05T12:38:16Z</dc:date>
    <item>
      <title>Connecting to SPDS (SAS Scalable Performance Data Server) from Python</title>
      <link>https://communities.sas.com/t5/Architecture/Connecting-to-SPDS-SAS-Scalable-Performance-Data-Server-from/m-p/811566#M372</link>
      <description>&lt;P&gt;We have been asked to add Python to the mix of software we are using.&amp;nbsp;&amp;nbsp; SPDS has been a central Database server for a long time and it works well with Base SAS but we have had a request to allow python connections.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am wondering about the best route and connection strings to support our python users in a Base SAS environment.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2022 21:15:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Architecture/Connecting-to-SPDS-SAS-Scalable-Performance-Data-Server-from/m-p/811566#M372</guid>
      <dc:creator>burchill</dc:creator>
      <dc:date>2022-05-04T21:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to SPDS (SAS Scalable Performance Data Server) from Python</title>
      <link>https://communities.sas.com/t5/Architecture/Connecting-to-SPDS-SAS-Scalable-Performance-Data-Server-from/m-p/811627#M373</link>
      <description>&lt;P&gt;If it's enought to access data throgh SQL, you should be able to connect to SPDS own ODBC driver connection.&lt;/P&gt;
&lt;P&gt;If you want to submit SAS code, you need to conenct to a SAS session that has SPDS libnames available. Here check the documentation for SASPy.&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 09:53:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Architecture/Connecting-to-SPDS-SAS-Scalable-Performance-Data-Server-from/m-p/811627#M373</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2022-05-05T09:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to SPDS (SAS Scalable Performance Data Server) from Python</title>
      <link>https://communities.sas.com/t5/Architecture/Connecting-to-SPDS-SAS-Scalable-Performance-Data-Server-from/m-p/811646#M374</link>
      <description>Thanks for the suggestion - yes we are using ODBC for connecting with other applications and those work (R, STATA for example).  When we attempt to connect with pyodbc I get the following response:&lt;BR /&gt;&lt;BR /&gt;import pyodbc&lt;BR /&gt;cnxn = pyodbc.connect('dsn=spds.common; uid=XXXX; pwd=XXXX')&lt;BR /&gt;&lt;BR /&gt;Traceback (most recent call last) :  File "&lt;PYSHELL&gt;&lt;BR /&gt;    cnxn = pyodbc.connect('dsn=spds.common; uid=XXXX; pwd=XXXX')&lt;BR /&gt;pyodbc.Error: ('S1C00', '[S1C00] [SAS] [SAS ODBC Driver not capable (-1) (SQLSetConnectAttr(SQL_ATTR_AUTOCOMMIT))')&lt;BR /&gt;&lt;BR /&gt;I apologize I should have put this in the first post.&lt;BR /&gt;&lt;/PYSHELL&gt;</description>
      <pubDate>Thu, 05 May 2022 12:11:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Architecture/Connecting-to-SPDS-SAS-Scalable-Performance-Data-Server-from/m-p/811646#M374</guid>
      <dc:creator>burchill</dc:creator>
      <dc:date>2022-05-05T12:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to SPDS (SAS Scalable Performance Data Server) from Python</title>
      <link>https://communities.sas.com/t5/Architecture/Connecting-to-SPDS-SAS-Scalable-Performance-Data-Server-from/m-p/811651#M375</link>
      <description>&lt;P&gt;Did you follow all these steps?&amp;nbsp;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/spdsug/p0d2bbuq1jkfnun1ksjw86cy5kfn.htm" target="_blank"&gt;https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/spdsug/p0d2bbuq1jkfnun1ksjw86cy5kfn.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 12:38:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Architecture/Connecting-to-SPDS-SAS-Scalable-Performance-Data-Server-from/m-p/811651#M375</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2022-05-05T12:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to SPDS (SAS Scalable Performance Data Server) from Python</title>
      <link>https://communities.sas.com/t5/Architecture/Connecting-to-SPDS-SAS-Scalable-Performance-Data-Server-from/m-p/811659#M376</link>
      <description>Thank you - yes.   We have ODBC connections to SPDS working from other applications (Access, R, STATA).  There are some hiccups writing to the SAS SPDS but reading works fine.&lt;BR /&gt;&lt;BR /&gt;The other suggestion about using saspy is being explored as well.&lt;BR /&gt;</description>
      <pubDate>Thu, 05 May 2022 13:00:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Architecture/Connecting-to-SPDS-SAS-Scalable-Performance-Data-Server-from/m-p/811659#M376</guid>
      <dc:creator>burchill</dc:creator>
      <dc:date>2022-05-05T13:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to SPDS (SAS Scalable Performance Data Server) from Python</title>
      <link>https://communities.sas.com/t5/Architecture/Connecting-to-SPDS-SAS-Scalable-Performance-Data-Server-from/m-p/811660#M377</link>
      <description>&lt;P&gt;Hmmm.... If this works out of R etc. but the message is "&lt;SPAN&gt;SAS ODBC Driver not capable" then it's may-be also worth to contact SAS TechSupport.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SASPy should work as well - also for writing data to SPDS. Method&amp;nbsp;sasdata2dataframe should allow to load SPDS tables into a dataframe.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 13:20:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Architecture/Connecting-to-SPDS-SAS-Scalable-Performance-Data-Server-from/m-p/811660#M377</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2022-05-05T13:20:17Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to SPDS (SAS Scalable Performance Data Server) from Python</title>
      <link>https://communities.sas.com/t5/Architecture/Connecting-to-SPDS-SAS-Scalable-Performance-Data-Server-from/m-p/811768#M378</link>
      <description>&lt;P&gt;We've built an open-source server for Base SAS - which comes with a full REST API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could easily spin this up and trigger a Stored Program (SAS code that queries your SPD tables) using the `/SASjsApi/stp/execute` endpoint.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Happy to jump on a call to help you get set up - we haven't documented the multi-user capability yet:&amp;nbsp; &lt;A href="https://github.com/sasjs/server" target="_blank"&gt;https://github.com/sasjs/server&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 22:32:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Architecture/Connecting-to-SPDS-SAS-Scalable-Performance-Data-Server-from/m-p/811768#M378</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2022-05-05T22:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to SPDS (SAS Scalable Performance Data Server) from Python</title>
      <link>https://communities.sas.com/t5/Architecture/Connecting-to-SPDS-SAS-Scalable-Performance-Data-Server-from/m-p/813809#M379</link>
      <description>&lt;P&gt;Thank you for all of your responses so far - the community is great.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have pyodbc working now for read access.&amp;nbsp; It required the autocommit=True option to be set.&amp;nbsp; It spins out a number of errors but the connection works.&amp;nbsp; There was a suggestion to use sqlAlchemy but there is no "dialect" information (that we could find) for SPDS.&lt;/P&gt;
&lt;P class="xmsonormal"&gt;We have also been looking at saspy as that seemed like a good solution but getting it to work in our environment has worked out (yet).&lt;/P&gt;
&lt;P class="xmsonormal"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="xmsonormal"&gt;import pyodbc&lt;/P&gt;
&lt;P class="xmsonormal"&gt;import os&lt;/P&gt;
&lt;P class="xmsonormal"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cnxn = pyodbc.connect('dsn=spds.DOMAIN; uid=XXXXXX)'; pwd=XXXXX'), autocommit=True)&lt;/P&gt;
&lt;P class="xmsonormal"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="xmsonormal"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="xmsonormal"&gt;Output:&lt;/P&gt;
&lt;P class="xmsonormal"&gt;05/12/22 16:42:33:(5480) SPDS- Message file spdsmsg.m open failed: errno=2&lt;/P&gt;
&lt;P class="xmsonormal"&gt;05/12/22 16:42:33:(5480) SPDS- Message file wglobal.m open failed: errno=2&lt;/P&gt;
&lt;P class="xmsonormal"&gt;05/12/22 16:42:33:(5480) SPDS- Message file engmsg.m open failed: errno=2&lt;/P&gt;
&lt;P class="xmsonormal"&gt;05/12/22 16:42:33:(5480) SPDS- Message file sqlmsg.m open failed: errno=2&lt;/P&gt;
&lt;P class="xmsonormal"&gt;05/12/22 16:42:33:(5480) SPDS- Message file supmsg.m open failed: errno=2&lt;/P&gt;
&lt;P class="xmsonormal"&gt;05/12/22 16:42:33:(5480) SPDS- Message file sqlmsob.m open failed: errno=2&lt;/P&gt;
&lt;P class="xmsonormal"&gt;05/12/22 16:42:33:(5480) SPDS- Message file xffile.m open failed: errno=2&lt;/P&gt;
&lt;P class="xmsonormal"&gt;05/12/22 16:42:33:(5480) SPDS- Message file zsem.m open failed: errno=2&lt;/P&gt;
&lt;P class="xmsonormal"&gt;05/12/22 16:42:33:(5480) SPDS- Message file dates.m open failed: errno=2&lt;/P&gt;
&lt;P class="xmsonormal"&gt;05/12/22 16:42:33:(5480) SPDS- Message file wxmsg.m open failed: errno=2&lt;/P&gt;
&lt;P class="xmsonormal"&gt;05/12/22 16:42:33:(5480) SPDS- Message file attrbm.m open failed: errno=2&lt;/P&gt;
&lt;P class="xmsonormal"&gt;05/12/22 16:42:33:(5480) SPDS- Message file hdpmsg.m open failed: errno=2&lt;/P&gt;
&lt;P class="xmsonormal"&gt;***MESSAGE NOT FOUND***&lt;/P&gt;
&lt;P class="xmsonormal"&gt;***MESSAGE NOT FOUND***&lt;/P&gt;
&lt;P class="xmsonormal"&gt;&amp;nbsp; SPDS_NOTE: User SPDSUSER(ACL Group EXTERNAL) connected to SPD(NT) 5.4&amp;nbsp; Server at XXX.XXX.XXX.X.&lt;/P&gt;
&lt;P class="xmsonormal"&gt;&amp;nbsp; SPDS_NOTE: Libref X0000001 was successfully assigned as follows:&lt;/P&gt;
&lt;P class="xmsonormal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Engine:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SPDSENG&lt;/P&gt;
&lt;P class="xmsonormal"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Physical Name: :5420m:\meta\XXXXX\&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2022 14:08:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Architecture/Connecting-to-SPDS-SAS-Scalable-Performance-Data-Server-from/m-p/813809#M379</guid>
      <dc:creator>burchill</dc:creator>
      <dc:date>2022-05-17T14:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to SPDS (SAS Scalable Performance Data Server) from Python</title>
      <link>https://communities.sas.com/t5/Architecture/Connecting-to-SPDS-SAS-Scalable-Performance-Data-Server-from/m-p/813810#M380</link>
      <description>I should add that we have read access working, write is still being checked.  Write from other applications works but it is very slow, still exploring.</description>
      <pubDate>Tue, 17 May 2022 14:11:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Architecture/Connecting-to-SPDS-SAS-Scalable-Performance-Data-Server-from/m-p/813810#M380</guid>
      <dc:creator>burchill</dc:creator>
      <dc:date>2022-05-17T14:11:43Z</dc:date>
    </item>
  </channel>
</rss>

