<?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 Connect SAS to AWS Athena via ODBC in Administration and Deployment</title>
    <link>https://communities.sas.com/t5/Administration-and-Deployment/Connect-SAS-to-AWS-Athena-via-ODBC/m-p/619351#M18065</link>
    <description>&lt;P&gt;We are trying to connect to Athena where users can dynamically change their connection parameters based on their needs.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;We can connect when we specify all the required parameters in the odbc.ini file (see 1 below). The UID and PWD parameters are being passed via the libname statement inside EG (See 2 below).&lt;/P&gt;&lt;P&gt;&amp;nbsp;-------- 1 ------&lt;/P&gt;&lt;P&gt;ODBC.INI&lt;/P&gt;&lt;P&gt;[Simba_Athena]&lt;/P&gt;&lt;P&gt;Driver=/opt/simba/athenaodbc/lib/64/libathenaodbc_sb64.so&lt;/P&gt;&lt;P&gt;AwsRegion=us-east-1&lt;/P&gt;&lt;P&gt;S3OutputLocation=s3://shared-bucket1-us-east-1/user/&lt;/P&gt;&lt;P&gt;AuthenticationType=IAM Credentials&lt;/P&gt;&lt;P&gt;#UID=xxxxxxxx&lt;/P&gt;&lt;P&gt;#PWD=*xxxxxxx&lt;/P&gt;&lt;P&gt;SessionToken=xxxxxxx&lt;/P&gt;&lt;P&gt;------------------------------------------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;-------- 2 ------&lt;/P&gt;&lt;P&gt;libname atena3 odbc dsn=Simba_Athena schema=xyz001_tst UID=xxxxxxx&lt;/P&gt;&lt;P&gt;PWD=xxxxx readbuff= &lt;STRONG&gt;10000&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;------------------------------------------------&lt;/P&gt;&lt;P&gt;We need to make this more dynamic and have the&amp;nbsp;S3OutputLocation and SessionToken variables available in the libname statement as we can't change the odbc.ini file every day.&lt;/P&gt;&lt;P&gt;&amp;nbsp;We are using:&lt;/P&gt;&lt;P&gt;1) ODBC Driver Manager:&amp;nbsp; unixODBC2.3.6&lt;/P&gt;&lt;P&gt;2) SimbaAthenaODBC-64bit.x86_64 1.0.5-1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We read this &lt;A href="https://communities.sas.com/t5/SAS-Data-Management/Connect-Athena-from-SAS-ODBC/td-p/501304" target="_blank"&gt;post&lt;/A&gt;; however, we do not use a proxy server.&lt;/P&gt;&lt;P&gt;&amp;nbsp;We read a couple posts about successful connections but need more detail.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/51161"&gt;@JBailey&lt;/a&gt;&lt;/P&gt;&lt;P&gt;Any help is appreciated (you responded to the post noted above about successful connection)!&lt;/P&gt;</description>
    <pubDate>Wed, 22 Jan 2020 22:25:34 GMT</pubDate>
    <dc:creator>eirigoyen</dc:creator>
    <dc:date>2020-01-22T22:25:34Z</dc:date>
    <item>
      <title>Connect SAS to AWS Athena via ODBC</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Connect-SAS-to-AWS-Athena-via-ODBC/m-p/619351#M18065</link>
      <description>&lt;P&gt;We are trying to connect to Athena where users can dynamically change their connection parameters based on their needs.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;We can connect when we specify all the required parameters in the odbc.ini file (see 1 below). The UID and PWD parameters are being passed via the libname statement inside EG (See 2 below).&lt;/P&gt;&lt;P&gt;&amp;nbsp;-------- 1 ------&lt;/P&gt;&lt;P&gt;ODBC.INI&lt;/P&gt;&lt;P&gt;[Simba_Athena]&lt;/P&gt;&lt;P&gt;Driver=/opt/simba/athenaodbc/lib/64/libathenaodbc_sb64.so&lt;/P&gt;&lt;P&gt;AwsRegion=us-east-1&lt;/P&gt;&lt;P&gt;S3OutputLocation=s3://shared-bucket1-us-east-1/user/&lt;/P&gt;&lt;P&gt;AuthenticationType=IAM Credentials&lt;/P&gt;&lt;P&gt;#UID=xxxxxxxx&lt;/P&gt;&lt;P&gt;#PWD=*xxxxxxx&lt;/P&gt;&lt;P&gt;SessionToken=xxxxxxx&lt;/P&gt;&lt;P&gt;------------------------------------------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;-------- 2 ------&lt;/P&gt;&lt;P&gt;libname atena3 odbc dsn=Simba_Athena schema=xyz001_tst UID=xxxxxxx&lt;/P&gt;&lt;P&gt;PWD=xxxxx readbuff= &lt;STRONG&gt;10000&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;------------------------------------------------&lt;/P&gt;&lt;P&gt;We need to make this more dynamic and have the&amp;nbsp;S3OutputLocation and SessionToken variables available in the libname statement as we can't change the odbc.ini file every day.&lt;/P&gt;&lt;P&gt;&amp;nbsp;We are using:&lt;/P&gt;&lt;P&gt;1) ODBC Driver Manager:&amp;nbsp; unixODBC2.3.6&lt;/P&gt;&lt;P&gt;2) SimbaAthenaODBC-64bit.x86_64 1.0.5-1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We read this &lt;A href="https://communities.sas.com/t5/SAS-Data-Management/Connect-Athena-from-SAS-ODBC/td-p/501304" target="_blank"&gt;post&lt;/A&gt;; however, we do not use a proxy server.&lt;/P&gt;&lt;P&gt;&amp;nbsp;We read a couple posts about successful connections but need more detail.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/51161"&gt;@JBailey&lt;/a&gt;&lt;/P&gt;&lt;P&gt;Any help is appreciated (you responded to the post noted above about successful connection)!&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2020 22:25:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Connect-SAS-to-AWS-Athena-via-ODBC/m-p/619351#M18065</guid>
      <dc:creator>eirigoyen</dc:creator>
      <dc:date>2020-01-22T22:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: Connect SAS to AWS Athena via ODBC</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Connect-SAS-to-AWS-Athena-via-ODBC/m-p/619865#M18085</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/161832"&gt;@eirigoyen&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have two options available:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;DSN-less ODBC connections - you can &lt;A href="https://support.sas.com/resources/papers/proceedings14/SAS039-2014.pdf" target="_self"&gt;read about it here&lt;/A&gt;. This is the approach that I used in the post you referenced.&lt;/LI&gt;
&lt;LI&gt;The CONOPTS= option.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;The trick is to look at the documentation for the ODBC driver and find the supported options. These options can be passed via either of these options.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following code uses a DSN-less connection to connect to Athena. The information contained in the COMPLETE= option overrides the odbc.ini information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname athena odbc
complete="DRIVER={Simba Athena ODBC Driver};
AwsRegion=us-east-1;
S3OutputLocation=s3://bogus-athena-results/;
AuthenticationType=IAM Profile;
AwsProfile=617292732428-jbsandbox;
UseProxy=1;
ProxyScheme=HTTP;
ProxyHost=111.111.111.111;
ProxyPort=80;
ProxyUID=ProxyUserID;
ProxyPWD=ProxyPassword;" schema=somedb;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Here is an example of conopts= (SAS/ACCESS Interface to Impala). The example shows how to pass the ODBC driver options to the driver. Like the DNS-less connection, CONOPTS= overrides the information in the odbc.ini file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname impdd  impala server='quickstart.cloudera' driver_vendor=datadirect
                      conopts="AuthenticationMethod=0;uid='Bert';pw='Ernie'";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check the documentation for the ODBC driver; there may be a way to use environment variables for the security stuff.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this doesn't help you, let me know and I will try to create an Athena example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best wishes,&lt;/P&gt;
&lt;P&gt;Jeff&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 13:45:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Connect-SAS-to-AWS-Athena-via-ODBC/m-p/619865#M18085</guid>
      <dc:creator>JBailey</dc:creator>
      <dc:date>2020-01-27T13:45:13Z</dc:date>
    </item>
  </channel>
</rss>

