You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Daniel Dai (Commented) (JIRA)" <ji...@apache.org> on 2012/03/13 20:20:40 UTC

[jira] [Commented] (PIG-2580) JsonStorage.java to also implement FileInputLoadFunc

    [ https://issues.apache.org/jira/browse/PIG-2580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13228621#comment-13228621 ] 

Daniel Dai commented on PIG-2580:
---------------------------------

JsonLoader is the loader pair for JsonStorage, have you tried that?
                
> JsonStorage.java to also implement FileInputLoadFunc
> ----------------------------------------------------
>
>                 Key: PIG-2580
>                 URL: https://issues.apache.org/jira/browse/PIG-2580
>             Project: Pig
>          Issue Type: Improvement
>          Components: build
>    Affects Versions: 0.10
>         Environment: /src/org/apache/pig/builtin/JsonStorage.java
>            Reporter: Daniel Rule
>              Labels: features
>   Original Estimate: 6h
>  Remaining Estimate: 6h
>
> Would be possible for someone to modify JsonStorage.java to also implement FileInputLoadFunc ? e.g. atleast to be able to load .json documents which were stored with PigStorage or use the same json structure?
> -- store JsonStorage() test
> a = load '/jsonStorage1.txt' as (a0:int, a1:{t:(a10:int, a11:chararray)},a2:(a20:double, a21), a3:map[chararray]);
> store a into '/jsonStorage1.json' using JsonStorage();
> -- load JsonStorage() test
> b = load '/jsonStorage1.json' using JsonStorage();
> descbibe a; -- both a and b have same schema but b got its schema from the json meta
> describe b; 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira