Getting below error message while creating table in hadoop via proc sql execute statement.Is there any server options or setting do i need to set to work with execute statement? Note:This code working with out execute statment.
ERROR: Connection is missing required option SERVER.
Code:
proc sql;
limit 10 |
Hmmm.
Is there really a server/schema named servername/schemaname in your system?
Because that's what you are providing for your connection
connect to hadoop as sashdp(server=servername port=10000 schema=schemaname subprotocol=hive2);
Daniel Santos @ www.cgd.pt
The issue here is that you are trying to embed a SAS pass-through query within a SAS EXECUTE pass-through. Instead complete the Pass-through EXECUTE statement by putting the Hive select clause directly in the HiVE CREATE TABLE statement. Like so:
proc sql;
connect to hadoop as sashdp(server=servername port=10000 schema=schemaname subprotocol=hive2);
execute(create table test08_sas row format delimited fields terminated by '\001'
stored as textfile as select *,date_sub('2016-08-31',99) as date_sub_value,
case when col1>="2016-01-23 then "2016-08-30"
else "2016-07-31" end as new_col1
from table1
limit 10
)by hadoop;
quit;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.