Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Pig >> mail # user >> How to extract the keys of a map ?


+
Vincent Barat 2012-06-29, 12:05
Copy link to this message
-
Re: How to extract the keys of a map ?
There's support for this in the trunk FYI:
https://issues.apache.org/jira/browse/PIG-2600

On Fri, Jun 29, 2012 at 5:05 AM, Vincent Barat <[EMAIL PROTECTED]>wrote:

> Hi !
>
> I've a bag of map...
>
> ([k3#v13,k1#v11,k2#v12])
> ([k1#v12,k2#v22])
> ([k4#v31])
>
> ... and would like to extract all key names:
>
> (k3)
> (k1)
> (k2)
> (k1)
> (k2)
> (k4)
>
> I cannot figure out how to do this (except by writting an UDF).
>
> Any idea ?
>
> Thanks a lot
>

--
*Note that I'm no longer using my Yahoo! email address. Please email me at
[EMAIL PROTECTED] going forward.*
+
Vincent Barat 2012-06-29, 18:55