Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

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


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.*
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB