BookmarkSubscribeRSS Feed
bimal_sen
Fluorite | Level 6

Hi Friends,

We have SAS Viya license. SAS® Studio (5.1), SAS® Viya® release:V.03.04.I failed to load cas in memory data to teradata db. But the reverse case load data from teradata db to cas in memory successfully. But i can successfully load data to Teradata db using SAS 9.4 libname or proc sql successfully.

Please suggest. Please find my code below.


--------------------------------Load teradata db to cas in memory------------------Successful----------------------------------------------------------
cas;
caslib tdlib
datasource=(srctype='teradata' dataTransferMode='serial' server='AWSTEST'
username='sasbi' password='sasbi' database='BIM');
run;
caslib _all_ list;
proc casutil;
list tables incaslib="casuser";
load casdata="price_dates" incaslib="tdlib" outcaslib="casuser" casout="price_dates_1";
list tables incaslib="casuser";
quit;
libname pp cas caslib=casuser;
proc print data =pp.price_dates_1(obs=10);
run;
---------------------------------Load cas in memory data to teradata db--------------------Failed-------------------------------------------------------
cas;
libname mycas cas caslib=casuser;
data mycas.carsWght;
set sashelp.cars;
if weight<5500 then delete;
keep make model type weight MPG_City;
run;
options msglevel=i;
caslib tdlib
datasource=(srctype='teradata' dataTransferMode='serial' server='AWSTEST'
username='sasbi' password='sasbi' database='BIM');
run;
proc casutil;
list tables incaslib="casuser";
load casdata="carsWght" incaslib="casuser" outcaslib="tdlib" casout="carsWght_1";
list tables incaslib="tdlib";
quit;
libname mytdlb cas caslib=tdlib;
proc print data=mytdlb.carsWght_1(obs=10);
run;


Regards,

Bimal

2 REPLIES 2
alexal
SAS Employee

@bimal_sen ,

 

I would like to see your SAS log with an error. It's very hard to understand the problem without seeing an error.

bimal_sen
Fluorite | Level 6

Thanks for your response. Please find the detail log below. Actually i want to move and save cas data (carsWght.sas7hdat) to teradata databse as carsWght_1.is there any other way to load??

 

Log Details:

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
75
76 cas;
NOTE: The session CASAUTO connected successfully to Cloud Analytic Services sasviya.wb.com using port 5570. The UUID is
2d1978d4-66cb-ea4c-9667-faba5a9b9dfc. The user is XBSEN and the active caslib is CASUSER(XBSEN).
NOTE: The SAS option SESSREF was updated with the value CASAUTO.
NOTE: The SAS macro _SESSREF_ was updated with the value CASAUTO.
NOTE: The session is using 0 workers.
77 libname mycas cas caslib=casuser;
NOTE: Libref MYCAS was successfully assigned as follows:
Engine: CAS
Physical Name: 2d1978d4-66cb-ea4c-9667-faba5a9b9dfc
78 data mycas.carsWght;
79 set sashelp.cars;
80 if weight<5500 then delete;
81 keep make model type weight MPG_City;
82 run;
NOTE: There were 428 observations read from the data set SASHELP.CARS.
NOTE: The data set MYCAS.CARSWGHT has 7 observations and 5 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds
83 options msglevel=i;
84 caslib tdlib
85 datasource=(srctype='teradata'
86 dataTransferMode='serial'
87 server='AWSTEST'
88 username='sasBI'
89 password=XXXXXXXXXXXXXXX
90 database='BIM');
NOTE: 'TDLIB' is now the active caslib.
NOTE: Cloud Analytic Services added the caslib 'TDLIB'.
NOTE: Action to ADD caslib TDLIB completed for session CASAUTO.
91 run;
92 proc casutil;
NOTE: The UUID '2d1978d4-66cb-ea4c-9667-faba5a9b9dfc' is connected using session CASAUTO.
93 list tables incaslib="casuser";
Caslib Information
Library CASUSER(XBSEN)
Source Type PATH
Description Personal File System Caslib
Path /opt/sas/viya/config/data/cas/default/casuserlibraries/xbsen/
Session local No
Active No
Personal Yes
Hidden No
Transient Yes
Table Information for Caslib CASUSER(XBSEN)
Table Number Number Indexed NLS Promoted Repeated
Name of Rows of Columns Columns encoding Created Last Modified Table Table
CARSWGHT 7 5 0 utf-8 2020-02-03T05:36:30-08:00 2020-02-03T05:36:30-08:00 No No
Table Information for Caslib CASUSER(XBSEN)
Table
Name View Compressed
CARSWGHT No No
NOTE: Cloud Analytic Services processed the combined requests in 0.001205 seconds.
94 load casdata="carsWght" incaslib="casuser" outcaslib="tdlib" casout="carsWght_1";
ERROR: The file or path 'carsWght' is not available in the file system.
ERROR: The action stopped due to errors.
NOTE: The Cloud Analytic Services server processed the request in 0.000541 seconds.
95 list tables incaslib="tdlib";
Caslib Information
Library TDLIB
Source Type teradata
DataTransferMode Serial
Session local Yes
Active Yes
Personal No
Hidden No
Transient No
Uid sasetl
Server AWSTEST
Database BIM
NOTE: No tables are available in caslib TDLIB of Cloud Analytic Services.
NOTE: Cloud Analytic Services processed the combined requests in 0.000776 seconds.
96 quit;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE CASUTIL used (Total process time):
real time 0.03 seconds
cpu time 0.04 seconds
97 libname mytdlb cas caslib=tdlib;
NOTE: Libref MYTDLB was successfully assigned as follows:
Engine: CAS
Physical Name: 2d1978d4-66cb-ea4c-9667-faba5a9b9dfc
98 proc print data=mytdlb.carsWght_1(obs=10);
NOTE: The table MYTDLB.CARSWGHT_1 does not exist in Cloud Analytic Services.
ERROR: File MYTDLB.CARSWGHT_1.DATA does not exist.
99 run;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
100
101 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
114

 

Regards,

Bimal

 

Regards,

Bimal

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!

Discussion stats
  • 2 replies
  • 969 views
  • 1 like
  • 2 in conversation