<?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: What's the pipe command to download a csv file from a aws s3 bucket , to the specific location in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/What-s-the-pipe-command-to-download-a-csv-file-from-a-aws-s3/m-p/950711#M45515</link>
    <description>&lt;P&gt;Based on documentation and starting with&amp;nbsp;SAS 9.4M5 you can specify the profile with both Proc S3 and the Filename S3 access method. There shouldn't be a need for explicitly calling the aws cli.&lt;BR /&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/n1volodm4xnj3xn1s99poiemcha2.htm#p069fwziyobyghn0zhz26dmcjnv2" target="_self"&gt;Optional Arguments&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The aws cli command for downloading a file will look similar to below.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;aws s3 cp s3://your-bucket-name/your-file.csv /path/to/destination/ --profile your_profile_name&lt;/PRE&gt;
&lt;P&gt;You need of course the aws cli installed from the environment where SAS executes.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To use a filename pipe with reading the .csv directly via a SAS data step I assume you would need to write directly to standard out. Copilot returned syntax as below for such a scenario.&lt;/P&gt;
&lt;PRE&gt;aws s3 cp s3://your-bucket-name/your-file.csv - --profile your_profile_name --output text&lt;/PRE&gt;
&lt;P&gt;In this command:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;-&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;after the S3 path tells the AWS CLI to write the output to stdout.&lt;/LI&gt;
&lt;LI&gt;&lt;CODE&gt;--output text&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;specifies the format of the output. You can also use&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;--output json&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;if you prefer JSON format.&lt;/LI&gt;
&lt;/UL&gt;</description>
    <pubDate>Thu, 14 Nov 2024 00:04:15 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2024-11-14T00:04:15Z</dc:date>
    <item>
      <title>What's the pipe command to download a csv file from a aws s3 bucket , to the specific location</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/What-s-the-pipe-command-to-download-a-csv-file-from-a-aws-s3/m-p/950709#M45514</link>
      <description>&lt;P&gt;Up to now, I have been using a proc s3 procedure to download file.&lt;/P&gt;
&lt;P&gt;But now, I would prefer to use a aws s3 command to download a csv file by specifying the profile I want to use.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do we do that ?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2024 21:59:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/What-s-the-pipe-command-to-download-a-csv-file-from-a-aws-s3/m-p/950709#M45514</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2024-11-13T21:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: What's the pipe command to download a csv file from a aws s3 bucket , to the specific location</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/What-s-the-pipe-command-to-download-a-csv-file-from-a-aws-s3/m-p/950711#M45515</link>
      <description>&lt;P&gt;Based on documentation and starting with&amp;nbsp;SAS 9.4M5 you can specify the profile with both Proc S3 and the Filename S3 access method. There shouldn't be a need for explicitly calling the aws cli.&lt;BR /&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/n1volodm4xnj3xn1s99poiemcha2.htm#p069fwziyobyghn0zhz26dmcjnv2" target="_self"&gt;Optional Arguments&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The aws cli command for downloading a file will look similar to below.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;aws s3 cp s3://your-bucket-name/your-file.csv /path/to/destination/ --profile your_profile_name&lt;/PRE&gt;
&lt;P&gt;You need of course the aws cli installed from the environment where SAS executes.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To use a filename pipe with reading the .csv directly via a SAS data step I assume you would need to write directly to standard out. Copilot returned syntax as below for such a scenario.&lt;/P&gt;
&lt;PRE&gt;aws s3 cp s3://your-bucket-name/your-file.csv - --profile your_profile_name --output text&lt;/PRE&gt;
&lt;P&gt;In this command:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;-&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;after the S3 path tells the AWS CLI to write the output to stdout.&lt;/LI&gt;
&lt;LI&gt;&lt;CODE&gt;--output text&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;specifies the format of the output. You can also use&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;--output json&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;if you prefer JSON format.&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Thu, 14 Nov 2024 00:04:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/What-s-the-pipe-command-to-download-a-csv-file-from-a-aws-s3/m-p/950711#M45515</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2024-11-14T00:04:15Z</dc:date>
    </item>
  </channel>
</rss>

