I’m trying to upload a SAS table to Redshift using the following simple command:
data rf.rsv_standing_cohort;
set epi.rsv_standing_cohort;
run;
where the “epi” library is on my local server and the “rf” library refers to my Redshift schema.
However, I’m getting the following error – part of my table is not being uploaded (original table size is 35,392 records).
Any ideas why the table upload is incomplete?
NOTE: SAS variable labels, formats, and lengths are not written to DBMS tables.
ERROR: CLI execute error: [SAS][ODBC Redshift Wire Protocol driver]This is either an Unknown Type or is not supported currently.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: There were 32750 observations read from the data set EPI.RSV_STANDING_COHORT.
WARNING: The data set RF.RSV_STANDING_COHORT may be incomplete. When this step was stopped there were 32749 observations and 9 variables.
ERROR: ROLLBACK issued due to errors for data set RF.RSV_STANDING_COHORT.DATA.
NOTE: DATA statement used (Total process time):
real time 1:35.32
cpu time 0.09 seconds
On the evidence you've posted it appears there is some data in row 32,750 of your SAS dataset that is causing a Redshift CLI error. I suggest you try loading just 32,749 rows from SAS and see if that works without errors:
data rf.rsv_standing_cohort;
set epi.rsv_standing_cohort (obs = 32749);
run;
If it does, then try this test to see if it fails on the first row:
data rf.rsv_standing_cohort;
set epi.rsv_standing_cohort (firstobs = 32750);
run;
If it does, then I suggest you examine the data in row 32,750 to see if you can spot what might be causing the error. Foreign language character might be one possibility.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.