08-26-2015 04:37 PM
I'm trying to read in a set of data from a Hive table which contains a complex data type (array) - effectively a JSON type structure.
I'm using SAS 9.4m3 and I can definitely retrieve the data using a simple libname statement but it arrives as a string with all the curly brackets and separators. I have an a Hive query that retrieves the data directly through Hive, but I'm having trouble making that query work through an explicit sql passthrough in SAS. it's very annoying.
the Hive query looks like this:
select a.var1, b.col.var1, c.col, d.col
lateral view explode(tabb) b
lateral view explode(b.value.var_x) c
lateral view explode(b.value.var_y) d
lateral view explode(b.value.var_z) e
where a.var1 = 'xyz123' limit 10;
when I wrap this in a proc sql wrapper for an hadoop connection (explicit passthrough) I get return code 2 from map reduce. The proc sql wrapper works for simple queries.
any thoughts comments or questions?