Pig
  1. Pig
  2. PIG-2580

JsonStorage.java to also implement FileInputLoadFunc

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 0.10.0
    • Fix Version/s: None
    • Component/s: build
    • Labels:
    • Environment:

      /src/org/apache/pig/builtin/JsonStorage.java

    • Release Note:
      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()
    • Tags:
      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;

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            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

                Development