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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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