BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
dhrumil_patel
Fluorite | Level 6

On SAS 9.3, I'm trying to read in a dataset from a Hadoop database into my work library. The code I'm using is this:

 

proc sql;
connect to hadoop(subprotocol=hive2 server='&servername' port=10000 schema=&schema_name);
create table work.my_data as
select * from connection to hadoop (
select *
from &table_name
where valuation_date = '2008-01-01'
);
quit;

 

I get an error (see below) indicating that some of the values are not in Hadoop UTF-8 format and that therefore, the data cannot be read in as a SAS data set: 

 

ERROR: Data from column 'make' in row 707 of the result set was not presented in Hadoop UTF-8 format. The length of this data is 21
bytes, and the first 7 characters are 'RENAULT'. Adding -JREOPTIONS (-Dfile.encoding=UTF-8) to the SAS invocation may
circumvent the issue. Otherwise the data should be corrected to UTF-8 format.

 

I tried searching for how to add -JREOPTIONS to the code, but was unable to find anything useful. Can anyone advise on the error and how to correct it? 

 

Thank you.

 

Dhrumil Patel

1 ACCEPTED SOLUTION

Accepted Solutions
1 REPLY 1
LinusH
Tourmaline | Level 20

You can't add it to the code, you assign at SAS invocation:

http://support.sas.com/documentation/cdl/en/hostunx/67929/HTML/default/viewer.htm#p1e05jrt9fhl7tn17o...

Data never sleeps

sas-innovate-2024.png

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.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 3702 views
  • 0 likes
  • 2 in conversation