I am pulling data from Azure Databricks using JDBC when I get an error as below. It seems to be a transcoding issue. My SAS session is running on LATIN1 encoding. I am using below command to run my programs right now. Any idea how to invoke SAS in UTF-8 mode from command line in Unix.
ERROR: Data from column 'Var1' in row 273138 of the result set was not presented in UTF-8 format. The length of this data is 17
bytes, and the first 7 characters are 'Castili'. Adding -JREOPTIONS (-Dfile.encoding=UTF-8) to the SAS invocation may
circumvent the issue. Otherwise the data should be corrected to UTF-8 format.
NOTE: The DATA step has been abnormally terminated.
NOTE: The SAS System stopped processing this step because of errors.
SAS Unix command:
/opt/sas/sharebi/config/Lev1/Applications/SASGridManagerClientUtility/9.4/sasgsub -gridsubmitpgm data_pull.sas -gridwork /data/team_abc/log -gridwaitnoresults
Did you try the suggestion from the log to add -JREOPTIONS to the invocation?
/opt/sas/sharebi/config/Lev1/Applications/SASGridManagerClientUtility/9.4/sasgsub -gridsubmitpgm data_pull.sas -gridwork /data/team_abc/log -gridwaitnoresults -JREOPTIONS (-Dfile.encoding=UTF-8)
The error message is weird. SAS is saying the data isn't UTF-8. Generally if SAS recognized the data as being UTF-8, it would at least try to transcode it for you, and you might get some transcoding warnings but it would "work". You might want to work with SAS tech support on this. You could try adding -encoding UTF-8 to your invocation.
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.
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.