<?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: How do I extract data from Snowflake into SAS efficiently ? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-extract-data-from-Snowflake-into-SAS-efficiently/m-p/873082#M344963</link>
    <description>&lt;P&gt;Thanks for the reply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Issue here is the size of the data.&lt;/P&gt;
&lt;P&gt;I extracted same data (billing table) from oracle and snowflake into SAS. Size of the data seems to be extremely huge when pulling from snowflake that it causing workspace issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could it be extra spaces padded to the columns ?&lt;/P&gt;
&lt;P&gt;So is it a good idea to create a predefined layout in SAS and then load it from snowflake ? or any configurations which can be changed to resolve this issue ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 30 Apr 2023 18:14:19 GMT</pubDate>
    <dc:creator>Sheeba</dc:creator>
    <dc:date>2023-04-30T18:14:19Z</dc:date>
    <item>
      <title>How do I extract data from Snowflake into SAS efficiently ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-extract-data-from-Snowflake-into-SAS-efficiently/m-p/873068#M344957</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to extract data from snowflake into SAS. I am not using SAS Viya. What options can I use for efficient data extraction?&lt;/P&gt;
&lt;P&gt;I tried extracting same table(same number of observations and same variables) from oracle and snowflake into SAS.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The table created from Oracle took up 4.7 GB and completed in approximately 4 mins.&lt;/P&gt;
&lt;P&gt;The table created from Snowflake took up 1221 GB and completely in approximately 3 Hour 20 mins.&lt;/P&gt;
&lt;P&gt;Can I use temporary table support for SAS access to overcome this issue ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Appreciate any help on this.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Sun, 30 Apr 2023 16:13:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-extract-data-from-Snowflake-into-SAS-efficiently/m-p/873068#M344957</guid>
      <dc:creator>Sheeba</dc:creator>
      <dc:date>2023-04-30T16:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract data from Snowflake into SAS efficiently ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-extract-data-from-Snowflake-into-SAS-efficiently/m-p/873069#M344958</link>
      <description>&lt;P&gt;What issue?&lt;/P&gt;
&lt;P&gt;You were able to download over 250 times as much data in only 50 times as much time.&lt;/P&gt;</description>
      <pubDate>Sun, 30 Apr 2023 16:36:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-extract-data-from-Snowflake-into-SAS-efficiently/m-p/873069#M344958</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-04-30T16:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract data from Snowflake into SAS efficiently ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-extract-data-from-Snowflake-into-SAS-efficiently/m-p/873082#M344963</link>
      <description>&lt;P&gt;Thanks for the reply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Issue here is the size of the data.&lt;/P&gt;
&lt;P&gt;I extracted same data (billing table) from oracle and snowflake into SAS. Size of the data seems to be extremely huge when pulling from snowflake that it causing workspace issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could it be extra spaces padded to the columns ?&lt;/P&gt;
&lt;P&gt;So is it a good idea to create a predefined layout in SAS and then load it from snowflake ? or any configurations which can be changed to resolve this issue ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 30 Apr 2023 18:14:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-extract-data-from-Snowflake-into-SAS-efficiently/m-p/873082#M344963</guid>
      <dc:creator>Sheeba</dc:creator>
      <dc:date>2023-04-30T18:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract data from Snowflake into SAS efficiently ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-extract-data-from-Snowflake-into-SAS-efficiently/m-p/873083#M344964</link>
      <description>&lt;P&gt;Most likely the table(s) in SNOWFLAKE have defined the character variables differently.&amp;nbsp; Compare the structures of the two SAS datasets. For example by running PROC CONTENTS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instead of defining them with an actual maximum length they probably defined them with a some type of undefined length variable type.&amp;nbsp; &amp;nbsp;Looks like the default in SNOWFLAKE is to limit them to&amp;nbsp;16,777,216 bytes which is about 500 times the maximum of 32,767 that can be used for a SAS variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might have to fix the tables in SNOWFLAKE.&amp;nbsp; Or make a view that redefines the variable types.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But you might be able to use the DBSASTYPE dataset option to tell SAS how to define the variables when it pulls from SNOWFLAKE.&amp;nbsp; However I am not sure if this changes the length of the strings that actually transferred or just impacts what is saved to the disk when the SAS dataset is written.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 30 Apr 2023 18:24:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-extract-data-from-Snowflake-into-SAS-efficiently/m-p/873083#M344964</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-04-30T18:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract data from Snowflake into SAS efficiently ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-extract-data-from-Snowflake-into-SAS-efficiently/m-p/873084#M344965</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31762"&gt;@Sheeba&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Following what&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;has just told you about Snowflake's default String column length (16+ M), I would suggest taking your Oracle Table description, and use it to define a View on top of Snowflake table with the use of CAST /TRY_CAST functions within Snowflake&lt;/P&gt;
&lt;P&gt;For null/blank values, you probably will need to use conditional logic.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps&lt;/P&gt;</description>
      <pubDate>Sun, 30 Apr 2023 18:34:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-extract-data-from-Snowflake-into-SAS-efficiently/m-p/873084#M344965</guid>
      <dc:creator>AhmedAl_Attar</dc:creator>
      <dc:date>2023-04-30T18:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract data from Snowflake into SAS efficiently ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-extract-data-from-Snowflake-into-SAS-efficiently/m-p/873085#M344966</link>
      <description>&lt;P&gt;Sure will do proc contents and will try out DBSASTYPE option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks a lot&amp;nbsp; for the suggestion.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 30 Apr 2023 18:47:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-extract-data-from-Snowflake-into-SAS-efficiently/m-p/873085#M344966</guid>
      <dc:creator>Sheeba</dc:creator>
      <dc:date>2023-04-30T18:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract data from Snowflake into SAS efficiently ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-extract-data-from-Snowflake-into-SAS-efficiently/m-p/873086#M344967</link>
      <description>&lt;P&gt;Sure. Thank you for the reply.&lt;/P&gt;
&lt;P&gt;Will compare the Oracle vs Snowflake table.&lt;/P&gt;</description>
      <pubDate>Sun, 30 Apr 2023 18:48:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-extract-data-from-Snowflake-into-SAS-efficiently/m-p/873086#M344967</guid>
      <dc:creator>Sheeba</dc:creator>
      <dc:date>2023-04-30T18:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract data from Snowflake into SAS efficiently ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-extract-data-from-Snowflake-into-SAS-efficiently/m-p/873091#M344970</link>
      <description>&lt;P&gt;Try setting the SAS COMPRESS option:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options compress = yes;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;That will compress all blank space out of text variables on disk, and should speed up data extracting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might also want to try the DBTEXTMAX option to set an upper limit on the size of your character variables.&lt;/P&gt;</description>
      <pubDate>Sun, 30 Apr 2023 20:51:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-extract-data-from-Snowflake-into-SAS-efficiently/m-p/873091#M344970</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-04-30T20:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract data from Snowflake into SAS efficiently ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-extract-data-from-Snowflake-into-SAS-efficiently/m-p/873095#M344973</link>
      <description>Thanks for the details. &lt;BR /&gt;&lt;BR /&gt;Sure ..I will try this options .</description>
      <pubDate>Mon, 01 May 2023 00:04:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-extract-data-from-Snowflake-into-SAS-efficiently/m-p/873095#M344973</guid>
      <dc:creator>Sheeba</dc:creator>
      <dc:date>2023-05-01T00:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: How do I extract data from Snowflake into SAS efficiently ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-extract-data-from-Snowflake-into-SAS-efficiently/m-p/873100#M344977</link>
      <description>&lt;P&gt;Sorry I mean't &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/acreldb/n1aqglg4ftdj04n1eyvh2l3367ql.htm" target="_blank" rel="noopener"&gt;DBMAX_TEXT&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2023 01:22:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-extract-data-from-Snowflake-into-SAS-efficiently/m-p/873100#M344977</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-05-01T01:22:17Z</dc:date>
    </item>
  </channel>
</rss>

