BookmarkSubscribeRSS Feed
bustergomez
Calcite | Level 5

Hello,

I can update a table in linux executing a sas prog that updates a hadoop table like:

 

I tried ;:

 

 

data hadoop.&file (DBCREATE_TABLE_OPTS="PARTITION BY (I INT)");
i=1; output;
j=2; output;
run;

 

I get this error:

HADOOP_6: Executed: on connection 2
CREATE TABLE `TD_201701` (`i` DOUBLE,`j` DOUBLE) PARTITION BY (I INT)  TBLPROPERTIES ('SAS OS Name'='Linux','SAS
Version'='9.04.01M3P06242015')

ERROR: Execute error: Error while compiling statement: FAILED: ParseException line 1:49 missing EOF at 'PARTITION' near ')'
ERROR: Error attempting to CREATE a DBMS table. ERROR: Error creating a Hive table (CREATE TABLE failed)..
NOTE: The DATA step has been abnormally terminated.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: SAS set option OBS=0 and will continue to check statements. This might cause NOTE: No observations in data set.
WARNING: The data set HADOOP.TD_201701 may be incomplete.  When this step was stopped there were 0 observations and 2 variables.

Summary Statistics for HADOOP are:
Total SQL execution seconds were:                   0.014254
Total SQL prepare seconds were:                     0.279080
Total seconds used by the HADOOP ACCESS engine were     0.300688

 

but I

I found this PDF: http://support.sas.com/resources/papers/proceedings17/SAS0190-2017.pdf

 

 

What I want to do is, when I get a new text file (monthly basis) is update a partition using SAS.  I'm updating the tables in linux.

 

Cheers

 

 

1 REPLY 1
LinusH
Tourmaline | Level 20
Your data step looks a bit weird. Why are you creating 'j' after the first output?
Try:
Options sastrace ",,,d" sastraceloc = saslog nostsuffix msglevel =i;
You probably get more info in the log from Hive.
Data never sleeps

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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