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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 3686 views
  • 0 likes
  • 2 in conversation