<?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: Athena ODBC.ini in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Athena-ODBC-ini/m-p/687656#M37131</link>
    <description>&lt;P&gt;You have two options available:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;DSN-less ODBC connections - you can&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings14/SAS039-2014.pdf" target="_self" rel="nofollow noopener noreferrer"&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;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;" schema=somedb;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an example of conopts=. 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 athena odbc datasrc=athena conopts="AwsRegion=us-east-1" schema=sas;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Check the documentation for the ODBC driver; there may be a way to use environment variables for some of this stuff.&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>Tue, 29 Sep 2020 20:13:38 GMT</pubDate>
    <dc:creator>JBailey</dc:creator>
    <dc:date>2020-09-29T20:13:38Z</dc:date>
    <item>
      <title>Athena ODBC.ini</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Athena-ODBC-ini/m-p/687347#M37119</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi, we're currently using an odbc.ini file to store connection / dsn information.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[athena]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Description=Simba Athena ODBC Driver (64-bit)&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;DSNDriver=driver&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AwsRegion=us-east-1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;S3OutputLocation=s3://bucket/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Schema=database&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AuthenticationType=IAM Profile&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;AwsProfile=default&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been testing / vetting out which parameters are required and what I can include in my SAS statement instead of storing it in the ini file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;LIBNAME athena ODBC DATAsrc=athena &lt;STRONG&gt;schema&lt;/STRONG&gt;="sas";&lt;BR /&gt;proc sql;&lt;BR /&gt;SELECT *&lt;BR /&gt;FROM athena.sas;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I see that I can use "schema" which will overwrite the schema set ini file. I'm curious if this can be done with region? I tried a few statements without any success:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;LIBNAME athena ODBC DATAsrc=athena schema="sas" &lt;STRONG&gt;region="us-east-1"&lt;/STRONG&gt;&lt;SPAN style="font-family: inherit;"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I tried replacing &lt;STRONG&gt;region&lt;/STRONG&gt; with &lt;STRONG&gt;awsregion&lt;/STRONG&gt; and &lt;STRONG&gt;BL_REGION&lt;/STRONG&gt;, neither of these worked.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Feedback is much appreciated. Thank you.&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 28 Sep 2020 21:04:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Athena-ODBC-ini/m-p/687347#M37119</guid>
      <dc:creator>SASUser_86</dc:creator>
      <dc:date>2020-09-28T21:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: Athena ODBC.ini</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Athena-ODBC-ini/m-p/687656#M37131</link>
      <description>&lt;P&gt;You have two options available:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;DSN-less ODBC connections - you can&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings14/SAS039-2014.pdf" target="_self" rel="nofollow noopener noreferrer"&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;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;" schema=somedb;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an example of conopts=. 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 athena odbc datasrc=athena conopts="AwsRegion=us-east-1" schema=sas;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Check the documentation for the ODBC driver; there may be a way to use environment variables for some of this stuff.&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>Tue, 29 Sep 2020 20:13:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Athena-ODBC-ini/m-p/687656#M37131</guid>
      <dc:creator>JBailey</dc:creator>
      <dc:date>2020-09-29T20:13:38Z</dc:date>
    </item>
  </channel>
</rss>

