pig-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eyal Allweil <eyal_allw...@yahoo.com.INVALID>
Subject Re: How to read JSON as a field using Apache Pig?
Date Sun, 17 Jun 2018 07:26:02 GMT
 Hi Alex,
I've posted an answer for you on Stack Overflow - I'm pasting it below, so if anyone wants
to offer any corrections, here or there, please do:
I think you need to use Twitter's Elephant Bird to parse a single json column in Pig. (If
you wanted to parse files that are json-only, you could simply use Pig's JsonLoader API).

Here is a related question - it looks like your json is also an array, so what's written there
will apply for you, too.

In case that doesn't work, here's a blog post describing how to write a Python UDF for a more
specific case of JSON parsing. You can of course do the same thing with a Java UDF.
 Regards,Eyal

    On Friday, June 15, 2018, 10:00:47 PM GMT+3, Alexandre Krabbe <alekrabbe@gmail.com>
wrote:  
 
 Please, can someone help me with this issue?

Here is the link to my question in Stack Overflow:
https://stackoverflow.com/questions/50878374/how-to-read-a-json-column-as-a-field-in-apache-pig

sincerely,
Alexandre Krabbe.
  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message