Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

HADOOP Pass through for SAS

avatar

I have few tables in hive which I need to access in my SAS platform.

I have created a Pass through query present below (marked some paths in *) but it is throwing error.

 
 
PROC SQL;
    CONNECT TO HADOOP(
    host = "bigdataplatform-gcg-&amb..lac.nsroot.net"
    schema = &ESQUEMA.
    HDFS_TEMPDIR = "/data/&HDFS./work/hive/&HDFS._ofc/"
    DBMAX_TEXT = *****
    uri = "jdbc:hive2://bigdataplatform-gcg-&amb..lac.nsroot.net:10000/&ESQUEMA.;principal=hive/*****T;ssl=true" 
    scratch_db = "&HDFS._ofc"
subchar=questionmark
    ); 
 
    CREATE TABLE Applicant AS
    SELECT     * 
FROM CONNECTION TO HADOOP (
 
WITH json_extract AS (
  SELECT 
    get_json_object(xml_data, '$.app.Id') AS ID,
    get_json_object(xml_data, '$.app.apply[0].flag') AS Flag,
    get_json_object(xml_data, '$.app.apply[0].Product') AS products
  FROM check
)
SELECT 
  ID,
  Flag,
  get_json_object(product_data, '$.Code') AS Code,
  get_json_object(product_data, '$.Line') AS Line,
  get_json_object(product_data, '$.status') AS Status
FROM json_extract
LATERAL VIEW OUTER EXPLODE(SPLIT(products, '},')) p AS product_data;
);
disconnect from hadoop;
quit;

 

1 REPLY 1

avatar

I am getting the following error in sas

FAILED: ParseException line 1:760 cannot recognize input
near ';' '<EOF>' '<EOF>' in lateral view