Goodmorning everyone.
Maybe I didn't understand the mechanism of multi threads.
With this simple test code:
cas mySession sessopts = (caslib = casuser timeout = 1800 locale = "en_US");
libname mycas cas caslib = casuser;
data mycas.ds1;
x=2;
put "The # of Threads is " _nthreads_; /* 3 */
run;
I get 12 lines instead of 1 and the following message in the log:
NOTES: Running DATA step in Cloud Analytic Services.
Processed intro on _THREADID_ = 11 _NTHREADS_ = 12
Processed intro on _THREADID_ = 4 _NTHREADS_ = 12
Processed intro on _THREADID_ = 2 _NTHREADS_ = 12
Processed intro on _THREADID_ = 5 _NTHREADS_ = 12
Processed intro on _THREADID_ = 3 _NTHREADS_ = 12
Processed intro on _THREADID_ = 1 _NTHREADS_ = 12
Processed intro on _THREADID_ = 12 _NTHREADS_ = 12
Processed intro on _THREADID_ = 7 _NTHREADS_ = 12
Processed intro on _THREADID_ = 10 _NTHREADS_ = 12
Processed intro on _THREADID_ = 8 _NTHREADS_ = 12
Processed intro on _THREADID_ = 9 _NTHREADS_ = 12
Processed intro on _THREADID_ = 6 _NTHREADS_ = 12
NOTE: The ds1 table in caslib CASUSER (sasdemo) has 12 observations and 1 variables.
NOTES: DATA statement used (total processing time):
real time 0.02 seconds
cpu time 0.01 seconds
Why? What is the correct way to load a table into a caslib?
Thank you
The example shows that the DATA Step processing is divided into multiple threads. However your code and the provided log do not fit together.
You are not actually loading any data.
Please provide some more information like:
Well have a look here https://go.documentation.sas.com/?docsetId=casdspgm&docsetTarget=n183xun5dd4dy5n1x453fw5reu8o.htm&do... it explains there various process modes.
In your case you need the SINGLE=YES option on the DATA statement like so:
data mycas.sometable / single=yes;
...
run;
thanks for the link to the documentation.
However, I still struggle to understand the meaning.
In practice, for large tables, it is better to do processing using the multi thread. But if I get an incorrect result (the example of 12 lines instead of 1) what do I do with speed?
As asked already earlier, we do need some details on the type of data that you want to load to CAS:
Also you should have a look here: https://go.documentation.sas.com/?docsetId=casfun&docsetTarget=n09ssmi0ko8uyfn1022ezo2hv0pm.htm&docs...
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Lock in the best rate now before the price increases on April 1.