SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

Error in Reading from Hadoop Database

Accepted Solution Solved
Reply
Contributor
Posts: 22
Accepted Solution

Error in Reading from Hadoop Database

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


Accepted Solutions
Solution
‎11-15-2016 02:35 PM
Super User
Posts: 5,433

Re: Error in Reading from Hadoop Database

Posted in reply to dhrumil_patel

All Replies
Solution
‎11-15-2016 02:35 PM
Super User
Posts: 5,433

Re: Error in Reading from Hadoop Database

Posted in reply to dhrumil_patel

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
☑ This topic is solved.

Need further help from the community? Please ask a new question.

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