pig-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Norbert Burger <norbert.bur...@gmail.com>
Subject Re: How can I generate a Map from a Tuple or a Bag
Date Thu, 08 Sep 2011 11:58:27 GMT
Hi Ruihong -- if you can coalesce your data into (key1, value1, key2,
value2, key3, value3...) format, then you can use the TOMAP built-in
function:

https://issues.apache.org/jira/browse/PIG-1809

If you have more complex conversion requirements, then you can pass
the data off to a UDF which returns back a map.

Norbert

2011/9/7 石瑞红 <ruihong.shi@ipinyou.com>:
>
> HI all,
>
> How can I generate a Map from a Tuple or a Bag?
> I am looking for an example.
>
> Ruihong
>

Mime
View raw message