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 Plain View
Pig >> mail # user >> Parsing a Complex JSON String?


+
Eli Finkelshteyn 2013-02-28, 18:44
+
Dmitriy Ryaboy 2013-02-28, 21:34
Copy link to this message
-
Re: Parsing a Complex JSON String?
The JsonLoader works, but problem is I'm not loading a JSON file, but just trying to parse a json string as part of a bigger data set. That's why I needed to use JsonStringToMap.

On Feb 28, 2013, at 1:34 PM, Dmitriy Ryaboy wrote:

> Does the EB json loader with
>
> elephantbird.jsonloader.nestedLoad = true
>
> Work?
>
>
>
> On Thu, Feb 28, 2013 at 10:44 AM, Eli Finkelshteyn <[EMAIL PROTECTED]>
> wrote:
>>
>> Hi Folks,
>>
>> I want to parse a string of complex JSON in Pig. Specifically, I want Pig
> to understand my JSON array as a bag instead of as a single chararray. When
> using JsonLoader, I can do this easily by specifying the schema, as in this
> question. Is there any way to either have Pig figure out my schema for me,
> or to specify it when Pig is parsing a string? I've been using
> JsonStringToMap, but can't find a way to specify Schema, or to have it
> properly understand my JSON array is an array and not a single char array.
> I looked at the code in JsonStringToMap, and it looks like it always
> specifies the schema for me as just a map of chararrays, which won't work
> for anything but the simplest JSON of a form like {string: string…}. Any
> ideas?
>>
>> Eli
+
Harsha 2013-02-28, 21:44
+
Eli Finkelshteyn 2013-03-01, 22:37
+
Harsha 2013-03-02, 05:10
+
Harsha 2013-03-02, 05:17
+
Harsha 2013-03-02, 05:51
+
Eli Finkelshteyn 2013-03-04, 11:22
+
harsha ch 2013-03-04, 16:01
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