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

Allow multiple paths in the load statement

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.2.0
    • Component/s: None
    • Labels:
      None

      Description

      From Tom White:

      I;m having a problem loading data from multiple paths in Pig. What I'm trying to do is to load data from a range of dates, so I would like to specify an input of two globbed paths:

      x = LOAD '2008/05/

      {26,27,28,29,30,31},2008/06/{1,2}'

      Pig doesn't seem to like this though as it's trying to interpret it as a single path. The best I can do it to use UNION:

      x1 = LOAD '2008/05/{26,27,28,29,30,31}

      '
      x2 = LOAD '2008/06/

      {1,2}

      '
      x = UNION x1, x2

      The downside to this is that I want to parameterize my paths, and having separate script for each number of paths in the input is cumbersome.

      Is there a better way of doing this? Are there any plans to support multiple paths, and/or PathFilters?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                olgan Olga Natkovich
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: