<?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 Passing credentials in saslib method in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Passing-credentials-in-saslib-method/m-p/584561#M484</link>
    <description>&lt;P&gt;Using saspy I am trying to connect to a teradata server using the saslib method. I have my username and password stored in a credentials file that I am referencing from an import statement and storing username and password as a python object.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I reference username and password in the saslib method one of the symbols in my password appears to be escaping the string and trying to resolve. The special character is the '@' symbol. Is there a way to fix this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using python 3.5.2 in a UNIX environmet and sas 9.4 on the grid&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Code:&lt;/P&gt;
&lt;PRE&gt;import saspy
from CONFIG.sasconfig import username, password

sas = saspy.SASsession(omruser=username, omrpw=password, cfgname='configname')

sas.saslib('rpt', engine='Teradata', options='user='+username+' pw='+password+' server=server1 schema=schema1')&lt;/PRE&gt;
&lt;P&gt;error:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;PRE&gt;libname rpt Teradata user=myusername pw=XXXX@XXXX server=server1 schema=schema1;
                                            _
                                            22
ERROR: Libref RPT is not assigned.
ERROR: Error in the LIBNAME statement.
ERROR 22-7: Invalid option name @.&lt;/PRE&gt;
&lt;/BLOCKQUOTE&gt;</description>
    <pubDate>Wed, 28 Aug 2019 13:49:40 GMT</pubDate>
    <dc:creator>supp</dc:creator>
    <dc:date>2019-08-28T13:49:40Z</dc:date>
    <item>
      <title>Passing credentials in saslib method</title>
      <link>https://communities.sas.com/t5/Developers/Passing-credentials-in-saslib-method/m-p/584561#M484</link>
      <description>&lt;P&gt;Using saspy I am trying to connect to a teradata server using the saslib method. I have my username and password stored in a credentials file that I am referencing from an import statement and storing username and password as a python object.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I reference username and password in the saslib method one of the symbols in my password appears to be escaping the string and trying to resolve. The special character is the '@' symbol. Is there a way to fix this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using python 3.5.2 in a UNIX environmet and sas 9.4 on the grid&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Code:&lt;/P&gt;
&lt;PRE&gt;import saspy
from CONFIG.sasconfig import username, password

sas = saspy.SASsession(omruser=username, omrpw=password, cfgname='configname')

sas.saslib('rpt', engine='Teradata', options='user='+username+' pw='+password+' server=server1 schema=schema1')&lt;/PRE&gt;
&lt;P&gt;error:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;PRE&gt;libname rpt Teradata user=myusername pw=XXXX@XXXX server=server1 schema=schema1;
                                            _
                                            22
ERROR: Libref RPT is not assigned.
ERROR: Error in the LIBNAME statement.
ERROR 22-7: Invalid option name @.&lt;/PRE&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Wed, 28 Aug 2019 13:49:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Passing-credentials-in-saslib-method/m-p/584561#M484</guid>
      <dc:creator>supp</dc:creator>
      <dc:date>2019-08-28T13:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: Passing credentials in saslib method</title>
      <link>https://communities.sas.com/t5/Developers/Passing-credentials-in-saslib-method/m-p/584575#M485</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;I replied, but it seems to have gone into the ether.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You need to put the password in quotes. &amp;nbsp;You can probably just put double quotes inside the existing single quotes; in SAS you would use quote(trim(password)), but I don't know the Python equivalent.&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;You're on a grid system? &amp;nbsp;Consider using an authdomain instead.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2019 14:19:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Passing-credentials-in-saslib-method/m-p/584575#M485</guid>
      <dc:creator>JackHamilton</dc:creator>
      <dc:date>2019-08-28T14:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: Passing credentials in saslib method</title>
      <link>https://communities.sas.com/t5/Developers/Passing-credentials-in-saslib-method/m-p/584578#M486</link>
      <description>&lt;P&gt;Hey, I think you can just quote the pw and it ought to work. Give this a try:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;sas.saslib('rpt', engine='Teradata', options='user='+username+' pw="'+password+'" server=server1 schema=schema1')&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hopefully that's all you need.&lt;/P&gt;
&lt;P&gt;Tom&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2019 14:24:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Passing-credentials-in-saslib-method/m-p/584578#M486</guid>
      <dc:creator>sastpw</dc:creator>
      <dc:date>2019-08-28T14:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: Passing credentials in saslib method</title>
      <link>https://communities.sas.com/t5/Developers/Passing-credentials-in-saslib-method/m-p/584579#M487</link>
      <description>&lt;P&gt;That did the trick! Thanks for the help.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2019 14:28:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Passing-credentials-in-saslib-method/m-p/584579#M487</guid>
      <dc:creator>supp</dc:creator>
      <dc:date>2019-08-28T14:28:09Z</dc:date>
    </item>
  </channel>
</rss>

