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

SAS update/create hadoop partition

Reply
Occasional Contributor
Posts: 9

SAS update/create hadoop partition

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

 

 

Super User
Posts: 5,483

Re: SAS update/create hadoop partition

Posted in reply to bustergomez
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
Ask a Question
Discussion stats
  • 1 reply
  • 97 views
  • 0 likes
  • 2 in conversation