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 >> Accessing Nested Json


Copy link to this message
-
Re: Accessing Nested Json
I thought map can only take bytearray as value type?

On Wed, Sep 29, 2010 at 1:53 PM, Alan Gates <[EMAIL PROTECTED]> wrote:

> Are you loading them as tuples or maps?  If you're loading them as tuples
> than you should be able to say x.keyA.pA (which should return "vA").  If
> you're loading them as maps than it would be x#'keyA'#'pA'
>
> Alan.
>
>
> On Sep 28, 2010, at 12:45 PM, rakesh kothari wrote:
>
>
>> Hi,
>>
>> Is there a good way to access nested properties that are multilevel deep
>> from Json objects loaded in Pig ?
>>
>> For example, if my json is like:
>>
>> {"keyA":{"pA":"vA"}} and I need to access "pA".
>>
>> Thanks,
>> -Rakesh
>>
>>
>
>
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