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

given a date that can match a SimpleDateFormat want to be able to extract arbitrary SimpleDateFormat data, like day or year

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.2.0
    • None
    • None
    • Patch Available

    Description

      Want to be able to do something like

      A = FOREACH raw GENERATE org.apache.pig.piggybank.evaluation.util.apachelogparser.DateExtractor(dayTime, "yyyy", "dd/MMM/yyyy:HH:mm:ss");

      to extract the year, or if your date is formatted as

      dd/MMM/yyyy:HH:mm:ss Z

      you could do something like

      A = FOREACH raw GENERATE org.apache.pig.piggybank.evaluation.util.apachelogparser.DateExtractor(dayTime, "MM-dd-yyyy");

      to grab out the day

      Attachments

        1. DateExtractor-PIG-476
          9 kB
          Earl Cahill

        Activity

          People

            spackest Earl Cahill
            spackest Earl Cahill
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: