BookmarkSubscribeRSS Feed
dkassis
Calcite | Level 5

Hi,

 

I am using EG 7.1 and have a URI connection to a Hadoop environment.  I am trying to load a CSV file that I uploaded to HDFS through Ambari.  I am trying to run the code below, it will run with no errors, but I don't see the table in my directory.  I know how to load using the proc hadoop procedure but since i am utilizing the URI through libraries I thought I could bypass this.  One thing I noticed is that when I run this in DBVISUALIZER I always set the directory initially with a 'use' statement.  What would be the equivalent of this with a SAS/ACESS URI connection?  I am wondering if my problem is that it doesn't know what database to put it to.

 

Any help would be appreciated.  

 

Thanks,

Dan

 

proc sql;

execute (create table bill_component_test(
DIST_ID string,
bill_component string,
statistics_cd string)
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.OpenCSVSerde'
WITH SERDEPROPERTIES ("escapeChar"="\\",
"quoteChar"="'"
"separatorChar"=",")
STORED AS INPUTFORMAT
"org.apache.hadoop.mapred.TextInputFormat"
OUTPUTFORMAT
"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat"
LOCATION "hdfs://MSNHDPPROD1/data/work/departmental/revenue_forecasting/bill_component");
quit;

2 REPLIES 2
ChrisNZ
Tourmaline | Level 20

I reckon you also need a connection name.

proc sql;

  connect ... as HIVE;

  execute by HIVE ( ... );

quit;

dkassis
Calcite | Level 5

Thanks for the reply, I am working on this now with our admins.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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