jayunit100 / bigpetstore

[OBSOLETE] Moved to Apache BigTop !!! See you there.
http://jayunit100.github.io/bigpetstore/slides
9 stars 3 forks source link

PIG improvements #4

Closed jayunit100 closed 10 years ago

jayunit100 commented 10 years ago

We need to use existing pig libraries for JSON export, for example see: http://pig.apache.org/docs/r0.10.0/api/org/apache/pig/builtin/JsonStorage.html

And remove our custom JSon line parsers etc... not really necessary i would think.

Ditto for HIVE ... Have to confirm if can HIVE queries output json?

http://stackoverflow.com/questions/9995694/json-output-format-for-hive-query-results

nsavageJVM commented 10 years ago

ok I have been working on this see http://stackoverflow.com/questions/17179200/pig-exception-on-simple-load

jsonstorage needs i

        <groupId>org.antlr</groupId>
        <artifactId>antlr-runtime</artifactId>
        <version>3.5</version>

but hive pulls in 3.0

so I have a working pom with exclusions for the 3.0

I have working pig code that uses a slightly customised JsonStorage parses/filters cities.csv and writes json like {"city":"bangkok","lattitude":"13.75","longitude":"100.48"}

jayunit100 commented 10 years ago

Ive relaxed JSONStorage for now - just serializing into maps in memory. we'll see how it pans out