<?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: Studio - Prepare Data CASL Drop table in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Studio-Prepare-Data-CASL-Drop-table/m-p/895377#M17531</link>
    <description>&lt;P&gt;The &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/v_042/casref/p14fpceaxx8pz9n1id0wrgj92mrt.htm" target="_blank" rel="noopener"&gt;CASUTIL DROPTABLE statement&lt;/A&gt; is one way of doing this.&lt;/P&gt;</description>
    <pubDate>Fri, 22 Sep 2023 04:19:19 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2023-09-22T04:19:19Z</dc:date>
    <item>
      <title>Studio - Prepare Data CASL Drop table</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Studio-Prepare-Data-CASL-Drop-table/m-p/895363#M17530</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am trying to unload a table from memory in the caslib.&amp;nbsp; For Develop SAS Code&lt;/P&gt;&lt;P&gt;the code is&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;------------------&lt;/P&gt;&lt;P&gt;/*Connecting to EAPG Resale Daily caslib */&lt;BR /&gt;LIBNAME TEST cas caslib="TEST FOLDER" DATALIMIT=ALL;&lt;BR /&gt;option DBIDIRECTEXEC;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;drop table TEST.TEST_SORT&lt;BR /&gt;;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;-----------------------------&lt;/P&gt;&lt;P&gt;Is it possible to use Prepare Data CASL option?&lt;/P&gt;&lt;P&gt;----------------&lt;/P&gt;&lt;P&gt;loadActionSet 'fedSql';&lt;BR /&gt;queryCode='drop table "'||_dp_inputCaslib||'"."TEST_SORT" {options force=true} ';&lt;/P&gt;&lt;P&gt;print queryCode;&lt;BR /&gt;ExecDirect / query=queryCode;&lt;/P&gt;&lt;P&gt;-------------&lt;/P&gt;&lt;P&gt;I try to run the prepare data query, the error is TEST_SORT cannot be found under the caslib.&amp;nbsp; Please help.&amp;nbsp; Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2023 02:47:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Studio-Prepare-Data-CASL-Drop-table/m-p/895363#M17530</guid>
      <dc:creator>Zengahoe</dc:creator>
      <dc:date>2023-09-22T02:47:12Z</dc:date>
    </item>
    <item>
      <title>Re: Studio - Prepare Data CASL Drop table</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Studio-Prepare-Data-CASL-Drop-table/m-p/895377#M17531</link>
      <description>&lt;P&gt;The &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/v_042/casref/p14fpceaxx8pz9n1id0wrgj92mrt.htm" target="_blank" rel="noopener"&gt;CASUTIL DROPTABLE statement&lt;/A&gt; is one way of doing this.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2023 04:19:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Studio-Prepare-Data-CASL-Drop-table/m-p/895377#M17531</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-09-22T04:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: Studio - Prepare Data CASL Drop table</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Studio-Prepare-Data-CASL-Drop-table/m-p/895378#M17532</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to use Prepare Data method instead of Develop SAS code method.&amp;nbsp; I am not sure how to code under CASL options&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2023 04:27:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Studio-Prepare-Data-CASL-Drop-table/m-p/895378#M17532</guid>
      <dc:creator>Zengahoe</dc:creator>
      <dc:date>2023-09-22T04:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: Studio - Prepare Data CASL Drop table</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Studio-Prepare-Data-CASL-Drop-table/m-p/895424#M17533</link>
      <description>&lt;P&gt;I don't really use the Prepare data application, but it seems like dropping tables with it is not appropriate. The reason being is it's creating a bunch of stuff behind the scenes that the next transformation needs. So when you drop a table the next transformation most likely will try to use it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I went ahead and tested this. Here is the code to do the task. The easiest way with CASL code is the table.dropTable action:&amp;nbsp;&lt;A href="https://go.documentation.sas.com/doc/da/pgmsascdc/v_043/caspg/cas-table-droptable.htm?fromDefault=" target="_self"&gt;https://go.documentation.sas.com/doc/da/pgmsascdc/v_043/caspg/cas-table-droptable.htm?fromDefault=&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Create a copy of the input table to the output table.                   */
/* This statement should be replaced by the actual code you intend to run. */
table.dropTable name='your_table_name' caslib='your_caslib' quiet=true;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;While this code works, after you run it in the transform it returns an error. My guess is after it drops the table the application is trying to create references to the table for the next transformation. Since you dropped the table it can't make those behind the scenes references. That's my guess. You can test it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are trying to build out a pipeline you can go to &lt;STRONG&gt;Develop Code and Flows&amp;nbsp; and use SAS Studio flows&lt;/STRONG&gt;. There are a variety of point and click steps you can use there for pretty much anything you need. You can also use variety of coding languages (SAS/SQL/CASL/Python).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a quick tutorial to flows:&amp;nbsp;&lt;A href="https://video.sas.com/detail/videos/sas-viya-quick-start/video/6325462242112/build-flows-with-sas-studio?autoStart=true" target="_self"&gt;Build Flows with SAS Studio&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2023 11:40:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Studio-Prepare-Data-CASL-Drop-table/m-p/895424#M17533</guid>
      <dc:creator>Panagiotis</dc:creator>
      <dc:date>2023-09-22T11:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: Studio - Prepare Data CASL Drop table</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Studio-Prepare-Data-CASL-Drop-table/m-p/895612#M17535</link>
      <description>&lt;P&gt;Thanks.&amp;nbsp; Will try it out.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2023 00:43:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Studio-Prepare-Data-CASL-Drop-table/m-p/895612#M17535</guid>
      <dc:creator>Zengahoe</dc:creator>
      <dc:date>2023-09-25T00:43:57Z</dc:date>
    </item>
  </channel>
</rss>

