<?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 CAS table promotion error in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/CAS-table-promotion-error/m-p/985395#M11544</link>
    <description>&lt;P&gt;I use the following options when creating a CAS table with the Query step in a SAS Studio flow:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="pic01.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/113829i71A8AB82F9476D5E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pic01.jpg" alt="pic01.jpg" /&gt;&lt;/span&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;&lt;P&gt;&amp;nbsp;&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The generated code correctly performs the droptable, create table, and save casdata (replace) actions.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Delete existing session-scope and global-scope tables cas.cas_table by using two delete statements. */
proc casutil;
   droptable casdata="cas_table" incaslib="cas" quiet;
   droptable casdata="cas_table" incaslib="cas" quiet;
quit;

PROC SQL;
   CREATE TABLE cas.cas_table (promote=yes) AS
   SELECT 
      ...
   FROM
      WORK.t111 t1
   ;
QUIT;
RUN;

/* Create a permanent copy of the in-memory table cas.cas_table */
proc casutil incaslib="cas" outcaslib="cas";
   save casdata="cas_table" replace;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;However, a problem occurs when a user opens a Visual Analytics report at the same time the table‑update script is running:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;The script deletes the CAS table from memory.&lt;/LI&gt;&lt;LI&gt;A user opens the VA report.&lt;/LI&gt;&lt;LI&gt;VA automatically loads the previous physical table from disk back into memory.&lt;/LI&gt;&lt;LI&gt;The script then attempts to create and promote the table, but VA has already promoted it, causing the error:&lt;BR /&gt;“The target table table_name of the promotion already exists. Please specify a different name.”&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;What is the best way to avoid conflicts between SAS Studio code and Visual Analytics?&amp;nbsp;Scheduling the job outside business hours is not an option.&lt;/P&gt;</description>
    <pubDate>Thu, 26 Mar 2026 08:59:42 GMT</pubDate>
    <dc:creator>y1234</dc:creator>
    <dc:date>2026-03-26T08:59:42Z</dc:date>
    <item>
      <title>CAS table promotion error</title>
      <link>https://communities.sas.com/t5/SAS-Studio/CAS-table-promotion-error/m-p/985395#M11544</link>
      <description>&lt;P&gt;I use the following options when creating a CAS table with the Query step in a SAS Studio flow:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="pic01.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/113829i71A8AB82F9476D5E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pic01.jpg" alt="pic01.jpg" /&gt;&lt;/span&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;&lt;P&gt;&amp;nbsp;&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The generated code correctly performs the droptable, create table, and save casdata (replace) actions.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Delete existing session-scope and global-scope tables cas.cas_table by using two delete statements. */
proc casutil;
   droptable casdata="cas_table" incaslib="cas" quiet;
   droptable casdata="cas_table" incaslib="cas" quiet;
quit;

PROC SQL;
   CREATE TABLE cas.cas_table (promote=yes) AS
   SELECT 
      ...
   FROM
      WORK.t111 t1
   ;
QUIT;
RUN;

/* Create a permanent copy of the in-memory table cas.cas_table */
proc casutil incaslib="cas" outcaslib="cas";
   save casdata="cas_table" replace;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;However, a problem occurs when a user opens a Visual Analytics report at the same time the table‑update script is running:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;The script deletes the CAS table from memory.&lt;/LI&gt;&lt;LI&gt;A user opens the VA report.&lt;/LI&gt;&lt;LI&gt;VA automatically loads the previous physical table from disk back into memory.&lt;/LI&gt;&lt;LI&gt;The script then attempts to create and promote the table, but VA has already promoted it, causing the error:&lt;BR /&gt;“The target table table_name of the promotion already exists. Please specify a different name.”&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;What is the best way to avoid conflicts between SAS Studio code and Visual Analytics?&amp;nbsp;Scheduling the job outside business hours is not an option.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2026 08:59:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/CAS-table-promotion-error/m-p/985395#M11544</guid>
      <dc:creator>y1234</dc:creator>
      <dc:date>2026-03-26T08:59:42Z</dc:date>
    </item>
  </channel>
</rss>

