hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tucker, Matt" <Matt.Tuc...@disney.com>
Subject RE: Delimiters for nested structures
Date Thu, 09 Feb 2012 13:37:40 GMT
What about creating a view that converts your data into JSON or XML?  You can then make use
of the get_json_object<https://cwiki.apache.org/Hive/languagemanual-udf.html#LanguageManualUDF-getjsonobject>()
or xpath<https://cwiki.apache.org/Hive/languagemanual-xpathudf.html>() functions.

Matt Tucker

From: Hao Cheng [mailto:haoc.cheng@yahoo.com]
Sent: Thursday, February 09, 2012 1:15 AM
To: user@hive.apache.org
Subject: Delimiters for nested structures

Hi,

My data have some map of map structures with customized delimiters.
As per Hive documents, by default, '\001' is the field separator; starting from '\002', every
2 consecutive characters are the delimiters of 1 level. My data do not follow this rule in
term of delimiters. I mostly just need to handle map of map. I do not find a way in create
table statement to redefine delimiters for more than 1 level nested structures. I try not
to transform the data as it was produced by some other upstream process.
Any ideas on how to do that in Hive? Thank you for your helps!

Regards,
Hao

Mime
View raw message