hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Grover <mgro...@oanda.com>
Subject Re: hive map field question
Date Wed, 23 Nov 2011 16:01:23 GMT
Hi Chalcy,
You could write a UDF that takes in a Map object and returns you the string you need.

Alternatively, you could use Hive Transform. Details here:https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Transform

When a map gets passed to your custom transform script, you could read it as a serialized
string.

Mark

----- Original Message -----
From: "Chalcy Raja" <Chalcy.Raja@careerbuilder.com>
To: user@hive.apache.org
Sent: Wednesday, November 23, 2011 10:48:07 AM
Subject: hive map field question




Hello HiveUsers, 



I have a need to convert a map<string,string> field to string field and vice versa in
a hive table. I could not do cast. 



I created two external tables with one has string and another map. I can join both to get
what I want, takes a long time. 



Any ideas of how it can be done efficiently ? 



Thanks, 

Chalcy 

Mime
View raw message