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

I've struggled to load an existing SAS dataset saved in a SAS server and load it to a designated db under the hadoop impala server. I've tried two ways of doing so but both were only able to create a table yet with no data loaded, seemingly for different reasons.

 

libname PrD	impala dsn=risk 	database=grn     user="&NBK@company.com" 	pw="&dbpass";
libname SAS "/retail/Adhoc";

/* Option 1 */
data PrD.smp_203;
	set SAS.smp_203;
run;

/* Option 2 */
proc sql;
connect to impala (dsn=&dsn database=&grn user="&NBK@company.com" pw="&dbpass");	
create table PrD.smp_203
    (BULKLOAD=YES
    BL_DATAFILE='/retail/Adhoc/'
    BL_HOST='MyIP_address'
    BL_PORT=50070)
as select * from SAS.smp_203;
quit;

 

The error I receive from 'Option 1' was, "ERROR: CLI execute error: [Cloudera][Support] (40470) Conversion error at column 1 and row 1: numeric value out of range." The first column of the SAS dataset was a numeric value with format 20. Was the error due to this particular column that has incompatible format to the hadoop server?

The error received as a result of 'Option 2' was a bit different: "ERROR: java.lang.NullPointerException

ERROR: CLI execute error: bulk load directory '/tmp' does not exist". I'm at a complete loss about this one and don't know where I'd start to debug this. 

Any inputs on this are greatly appreciated, whether you were to comment just on one of the options I had above, or providing an alternative way of doing so. If you choose to comment on one of the above, please kindly provide a top-down comment on why the error occurred and a possible way of remediation. 

Thanks community! I owe you, again. 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Bankshot
Obsidian | Level 7

Update: I found out the reason on this. Apparently proc sql will not assign formats to derived variables, that's why the select * here wouldn't work. The second obstacle was when I referred to cccp_key’s format in SAS, I assumed it was format 20.0 based on the output from running proc contents. However, proc sql it requires the exact output so I had to change my format accordingly. The max number of my first column is 16-digit number, not 20. Hence:

proc sql;

      create table PrD.smp_203 as

      select account_key format=16.0 as account_key, date, etc, etc...

      from SAS.smp_203;

run;

View solution in original post

3 REPLIES 3
yabwon
Onyx | Level 15
Did you saw this: https://support.sas.com/kb/63/350.html ?
Bart
_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



Bankshot
Obsidian | Level 7

I did see this. But first, I did use bulk load 

BULKLOAD=YES

I'm also lost at its suggestion on to "make a copy of the core-site.xml file and move it into the SAS_HADOOP_JAR_PATH directory". I have no idea how this works. What is SAS_HADOOP_JAR_PATH

Bankshot
Obsidian | Level 7

Update: I found out the reason on this. Apparently proc sql will not assign formats to derived variables, that's why the select * here wouldn't work. The second obstacle was when I referred to cccp_key’s format in SAS, I assumed it was format 20.0 based on the output from running proc contents. However, proc sql it requires the exact output so I had to change my format accordingly. The max number of my first column is 16-digit number, not 20. Hence:

proc sql;

      create table PrD.smp_203 as

      select account_key format=16.0 as account_key, date, etc, etc...

      from SAS.smp_203;

run;

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1658 views
  • 1 like
  • 2 in conversation