BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
C_Golen
Obsidian | Level 7

Greetings,

 

I am new to FED SQL. I get the following error when I want to pull a table from SAS Base to CASLIB. What is the reason?

Code:

 

libname STG_DATA "/datastagingarea/STGLIB";
cas mySession sessopts=(caslib=analytic timeout=3600 locale="en_US" metrics=true);
proc fedsql sessref=mySession;
   create table analytic.FED_SQL2{options  replace=true replication=0} as
   select *
   from stg_data.POS_TEST as t1
;quit ;

Error Message:

 

 

1    %studio_hide_wrapper;
83   proc fedsql sessref=mySession;
84      create table analytic.FED_SQL2{options  replace=true replication=0} as
85      select *
86      from stg_data.POS_TEST as t1
87   ;
87 !  quit ;
NOTE: Executing action 'fedSql.execDirect'.
ERROR: The caslib STG_DATA does not exist or could not be accessed.
ERROR: Table "STG_DATA.POS_TEST" does not exist or cannot be accessed
ERROR: The action stopped due to errors.
NOTE: Action 'fedSql.execDirect' used (Total process time):
NOTE:       real time               0.043427 seconds
NOTE:       cpu time                0.056188 seconds (129.38%)
NOTE:       total nodes             5 (72 cores)
NOTE:       total memory            1.11T
NOTE:       memory                  5.86M (0.00%)
ERROR: The FedSQL action was not successful.
NOTE: PROC FEDSQL has set option NOEXEC and will continue to prepare statements.
NOTE: PROCEDURE FEDSQL used (Total process time):
      real time           0.12 seconds
      cpu time            0.01 seconds
      
88   
89   
90   %studio_hide_wrapper;
101  
102  

 

 

Extra: Is there any way to save the table as sashdat to caslib with Fed SQL, what is the best-practice?

1 ACCEPTED SOLUTION

Accepted Solutions
LinusH
Tourmaline | Level 20

It seems so, I get an error as well, even if I don't state a CAS session in the proc.

But proc sql works.

Do you need it to be FedSQL specifically?

Data never sleeps

View solution in original post

3 REPLIES 3
LinusH
Tourmaline | Level 20

I think that you need to upload your stg_data table to CAS to make it available for your CAS session.

SAS Help Center: Load Data to a Caslib

Data never sleeps
C_Golen
Obsidian | Level 7

Hi LinusH,

 

Thanks for answering. As far as I understand it is not possible to load a sas table to cas by using Fed SQL which is my main goal.

Is it correct?

LinusH
Tourmaline | Level 20

It seems so, I get an error as well, even if I don't state a CAS session in the proc.

But proc sql works.

Do you need it to be FedSQL specifically?

Data never sleeps

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 269 views
  • 0 likes
  • 2 in conversation