Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-2580

JsonStorage.java to also implement FileInputLoadFunc

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • 0.10.0
    • None
    • build
    • /src/org/apache/pig/builtin/JsonStorage.java

    • Any document saved using JsonStorage() can also be loaded using JsonStorage(). Any HDFS folder containing compatible naming and json conventions may be loaded using JsonStorage()
    • pig json load

    Description

      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;

      Attachments

        Activity

          People

            Unassigned Unassigned
            darule0 Daniel Rule
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 6h
                6h
                Remaining:
                Remaining Estimate - 6h
                6h
                Logged:
                Time Spent - Not Specified
                Not Specified