Hi, i'm trying to perform oversampling on SAS Studio. Before performing the oversampling, I have create cas session to connect with the libraries, here is the code.
cas casauto host="example.host" port=5570;
proc cas;
session casauto;
session.sessionstatus result=s;
put s;
run;
CASLIB _ALL_ assign;
options casdatalimit=50G;
After that, i performed the oversampling and it worked just fine without any errors.
As you can see the output table is already listed on the public library. But when I tried to look for the table from SAS VA or Environment Manager the table doesn't appear. This issue also happened before when I ran a query file, the output table is listed on the library in SAS Studio but I couldn't find the table when I tried to add the data to SAS VA.
Did I miss anything?
Hi @adjie,
In order to access an in-memory table from another SAS Viya application such as VA or Environment Manager, you need to "promote" the table so that it has "global" scope. For example, you can do this by using the DATA step:
data public.pd_sampled(promote=yes);
set public.pd_sampled;
run;
Or you can use the table.promote action directly:
proc cas;
action table.promote /
caslib='public',
table='pd_sampled';
run;
quit;
By default, in-memory CAS tables have "session" scope, meaning that they are available only within the specific CAS session that you are working with. So to make a table available in a different CAS session (the new CAS session that is created when you use VA), you need to promote the table to be global scope.
Does that take care of the issue?
Thanks,
-Brian
Hi @adjie,
In order to access an in-memory table from another SAS Viya application such as VA or Environment Manager, you need to "promote" the table so that it has "global" scope. For example, you can do this by using the DATA step:
data public.pd_sampled(promote=yes);
set public.pd_sampled;
run;
Or you can use the table.promote action directly:
proc cas;
action table.promote /
caslib='public',
table='pd_sampled';
run;
quit;
By default, in-memory CAS tables have "session" scope, meaning that they are available only within the specific CAS session that you are working with. So to make a table available in a different CAS session (the new CAS session that is created when you use VA), you need to promote the table to be global scope.
Does that take care of the issue?
Thanks,
-Brian
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.