BookmarkSubscribeRSS Feed
Quartz | Level 8

Hi all,


This has been an annoying issue I've had with Viya for over a year now. I resolve it by logging out and logging back in, but I wonder if there is a better method.


When uploading a dataset in SAS Studio to CAS for use within Visual Analytics, I often receive a message similar to: 


"Promotion already exists, please try under a different name"


This usually happens when I adjust a part of the code and re-run the process.


There is no rhyme or reason why this happens as far as I can tell. Some of my programs re-run multiple time and rewrite to CAS with no problem, others receive this error. Both use the same CAS server, process, macros, etc.


Any ideas how to limit this annoyance going forward?

Quartz | Level 8
Thanks Josvander, but unfortunately the original poster's issue was not resolved when they mentioned the same issue I am having. I believe it to be a SAS Viya bug as sometimes this message stops a promotion and sometimes it doesn't with no change in code.

The ERROR you are seeing indicates that you are attempting to load and promote data to a CAS-table that already exists.  
A global table cannot be replaced.  It must be dropped first and then recreated.  You can add the DROPTABLE statement to your PROC CASUTIL code.  
The below statement will drop the table if it already exists.
Suppose ABC_XYZ_STATISTICS is in PUBLIC CASLIB, the example code then looks like:

droptable casdata='ABC_XYZ_STATISTICS' incaslib='public' quiet;

Also, it's possible that the DROPTABLE step is not 100% finished before the second / next steps starts execution.   In cases like these, the problem can be resolved by pausing execution between steps.   This can be done using the SLEEP function.  Try adding the following DATA _null_ step in between the PROC CASUTIL that drops the table and the one that loads it.

/* this code will cause your system to 'sleep' for 90 seconds */
data _null_;




Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

Discussion stats
  • 3 replies
  • 3 in conversation