<?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 to create a temporary table in CAS in Developers</title>
    <link>https://communities.sas.com/t5/Developers/How-to-create-a-temporary-table-in-CAS/m-p/647109#M799</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/28909"&gt;@AllanBowe&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I see this has been answered, but wanted to add the response I had ready.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I spoke with a couple of SMEs on this. They agreed your plan is correct for your use case: &lt;SPAN&gt;create tables in the shared CASUSER library.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this instance there is not a 1-to-1 equivalent way of handling in SAS9 vs SAS Viya. CASUSER is as close as your going to get to mimicking the SAS9 functionality. This is a situation where we have to think in terms of CAS programming vs directly translating SAS9 concepts into CAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I spoke with&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/7931"&gt;@SteveSober&lt;/a&gt;&amp;nbsp;about the one-level naming. He mentioned the PROC DELETE step is not required, so long as the CASUSER table is not promoted.&lt;/P&gt;</description>
    <pubDate>Tue, 12 May 2020 14:37:43 GMT</pubDate>
    <dc:creator>joeFurbee</dc:creator>
    <dc:date>2020-05-12T14:37:43Z</dc:date>
    <item>
      <title>How to create a temporary table in CAS</title>
      <link>https://communities.sas.com/t5/Developers/How-to-create-a-temporary-table-in-CAS/m-p/646425#M794</link>
      <description>&lt;P&gt;I'm running a Job Execution Service as the backend for a HTML5 web app using a shared service account on SAS Viya 3.5 as described &lt;A href="https://sasjs.io/guides/viya/#shared-account-and-server-re-use" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The challenge is, that my app is attempting to left join a WORK table with a large CASLIB table, which then fails with:&lt;/P&gt;
&lt;PRE&gt;ERROR: The maximum allowed bytes (104857600) of data have been fetched from Cloud Analytic Services. Use the DATALIMIT option to increase the maximum value.&lt;/PRE&gt;
&lt;P&gt;I'd rather not increase the limit, as the table could be very large.&amp;nbsp; Instead I'd like to push my WORK table into CAS and perform the join there, returning the subset I need.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The challenge is, that my app will have many users, potentially running this join concurrently.&amp;nbsp; My current plan is to create tables in the shared CASUSER library that are named using an md5() hash, thereby virtually guaranteeing uniqueness and avoiding a naming clash.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Whilst I'll certainly clean up this table afterwards, my concern is whether some unforeseen bug will prevent the cleanup operation.&amp;nbsp; It would be better to create this table in a location that would be automatically cleared (like SASWORK).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there such concept of a CASWORK library?&amp;nbsp; (implied &lt;A href="https://blogs.sas.com/content/sgf/2018/06/21/how-to-reference-cas-tables-using-a-one-level-name/" target="_self"&gt;here&lt;/A&gt; but that still ends with a proc delete)&lt;/P&gt;</description>
      <pubDate>Sat, 09 May 2020 22:17:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/How-to-create-a-temporary-table-in-CAS/m-p/646425#M794</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2020-05-09T22:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a temporary table in CAS</title>
      <link>https://communities.sas.com/t5/Developers/How-to-create-a-temporary-table-in-CAS/m-p/646709#M795</link>
      <description>&lt;P&gt;Adding the data into CAS makes sense, as you describe.&amp;nbsp; By default, the table that you transfer to CAS is session scoped.&amp;nbsp; Only the session that transfers the data can access that session-scoped table.&amp;nbsp; That should help sidestep the need for unique table names.&lt;/P&gt;
&lt;P&gt;If you can use FedSQL, you can specify the SESSREF= option on the PROC FEDSQL statement to ensure that the join runs in CAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;More info about session and global scope tables: &lt;A href="https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=casfun&amp;amp;docsetTarget=n09ssmi0ko8uyfn1022ezo2hv0pm.htm&amp;amp;locale=en#p0mbflp8ta6iq3n1aswoae5s5g76" target="_self"&gt;Session and Global Scope&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;FedSQL: &lt;A href="https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=proc&amp;amp;docsetTarget=n06w5kqwkurgk2n1irjo6h94fkcq.htm&amp;amp;locale=en#p16fk4muwh579un1b6b5hhf3tdi1" target="_self"&gt;SESSREF=&lt;/A&gt;&amp;nbsp;, and &lt;A href="https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=casfedsql&amp;amp;docsetTarget=titlepage.htm&amp;amp;locale=en" target="_self"&gt;FedSQL programming for CAS&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 14:20:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/How-to-create-a-temporary-table-in-CAS/m-p/646709#M795</guid>
      <dc:creator>MikeMcKiernan</dc:creator>
      <dc:date>2020-05-11T14:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a temporary table in CAS</title>
      <link>https://communities.sas.com/t5/Developers/How-to-create-a-temporary-table-in-CAS/m-p/646793#M796</link>
      <description>This was exactly my approach.  I put uniquely named tables in the CASUSER library and `proc fedsql` with the sessref option to join them.&lt;BR /&gt;&lt;BR /&gt;Thanks!</description>
      <pubDate>Mon, 11 May 2020 16:21:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/How-to-create-a-temporary-table-in-CAS/m-p/646793#M796</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2020-05-11T16:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a temporary table in CAS</title>
      <link>https://communities.sas.com/t5/Developers/How-to-create-a-temporary-table-in-CAS/m-p/647109#M799</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/28909"&gt;@AllanBowe&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I see this has been answered, but wanted to add the response I had ready.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I spoke with a couple of SMEs on this. They agreed your plan is correct for your use case: &lt;SPAN&gt;create tables in the shared CASUSER library.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this instance there is not a 1-to-1 equivalent way of handling in SAS9 vs SAS Viya. CASUSER is as close as your going to get to mimicking the SAS9 functionality. This is a situation where we have to think in terms of CAS programming vs directly translating SAS9 concepts into CAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I spoke with&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/7931"&gt;@SteveSober&lt;/a&gt;&amp;nbsp;about the one-level naming. He mentioned the PROC DELETE step is not required, so long as the CASUSER table is not promoted.&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2020 14:37:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/How-to-create-a-temporary-table-in-CAS/m-p/647109#M799</guid>
      <dc:creator>joeFurbee</dc:creator>
      <dc:date>2020-05-12T14:37:43Z</dc:date>
    </item>
  </channel>
</rss>

