Grokbase Groups Pig user January 2011
FAQ
Hey,

I'm just porting a json StoreFunc class method I wrote from pig 0.6 to pig
0.8 so I can take advantage of the schema that the Store's can use from 0.7
onwards.
I'm overloaded the method to get the chema when the saving starts but am
finding the ResourceSchema object being sent is always null so I'm not able
to use it.

I've put a few samples of this online so you can see here
https://gist.github.com/804551 (I'll be open sourcing all of this once I'm
done)

I'm testing this out with the following Pig Code.

A = LOAD "test" AS (a:chararray, b:chararray);

STORE A USING ... JsonStorage();

Is this correct or is there another way to get the schema for the StoreFunc?

Thanks,

--
Dan Harvey | Datamining Engineer
www.mendeley.com/profiles/dan-harvey

Mendeley Limited | London, UK | www.mendeley.com
Registered in England and Wales | Company Number 6419015

Search Discussions

  • Daniel Dai at Feb 1, 2011 at 10:20 pm
    Looks like you should be able to get ResourceSchema in checkSchema, as
    long as the schema for the alias is not null.

    Daniel

    Dan Harvey wrote:
    Hey,

    I'm just porting a json StoreFunc class method I wrote from pig 0.6 to pig
    0.8 so I can take advantage of the schema that the Store's can use from 0.7
    onwards.
    I'm overloaded the method to get the chema when the saving starts but am
    finding the ResourceSchema object being sent is always null so I'm not able
    to use it.

    I've put a few samples of this online so you can see here
    https://gist.github.com/804551 (I'll be open sourcing all of this once I'm
    done)

    I'm testing this out with the following Pig Code.

    A = LOAD "test" AS (a:chararray, b:chararray);

    STORE A USING ... JsonStorage();

    Is this correct or is there another way to get the schema for the StoreFunc?

    Thanks,

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriespig, hadoop
postedJan 31, '11 at 6:48p
activeFeb 1, '11 at 10:20p
posts2
users2
websitepig.apache.org

2 users in discussion

Dan Harvey: 1 post Daniel Dai: 1 post

People

Translate

site design / logo © 2021 Grokbase