01-16-2019 04:11 AM
I have one column in hive table wherein I have stored entire json data map as string. I am using get_json_object to fetch each element of json. However I have one element which is array of structs. I need to explode that array of structs.
Entire evtDataMap is stored in a hive column and I want the output like
Basically I want to flatten the array of structs.
I am using query like this
eventName is a hive table column.I am getting an error as
"FAILED: UDFArgumentException Top level object must be an array but was string"
Tried array over get_json_object but still I am getting an error
Error FAILED: UDFArgumentException The sub element must be struct, but was string
I am stuck with this issue since 3 days, any help is much much appreciated..