Hi all,
I have a table like this:
hive> desc mytable;
ts bigint
content map<string,string>
hive> select * from mytable;
1354299050 {"F1":"id-1"}
1354299040 {"F1":"id-2","F2":"id-3"}
1354299030 {"F1":"id-3","F2":"id-1","F3":"id-4"}
Does anyone know how to generate a table like this:
hive> desc resulttable;
id string
ts bigint
hive> select * from resulttable;
id-1 1354299050
id-2 1354299040
id-3 1354299040
id-3 1354299030
id-1 1354299030
id-4 1354299030
I mean I can certainly write a UDTF to generate a table like this, but I
wonder is there an existing UDTF to do this job?
Thanks,
Xu
--
Ji Xu
Mobile: (+86) 138-115-10101
E-mail: [email protected]
Homepage: http://about.me/jixu
Room 825, School of Software,
Main Building, Tsinghua University,
Beijing, 100084, P. R. China.