Package org.apache.pig.piggybank.evaluation.datetime.truncate

Class Summary
ISOToDay ISOToDay truncates an ISO8601 datetime string to the precision of the day field Jodatime: http://joda-time.sourceforge.net/ ISO8601 Date Format: http://en.wikipedia.org/wiki/ISO_8601 Example usage: REGISTER /Users/me/commiter/piggybank/java/piggybank.jar ; REGISTER /Users/me/commiter/piggybank/java/lib/joda-time-1.6.jar ; DEFINE ISOToYear org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToYear(); DEFINE ISOToMonth org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToMonth(); DEFINE ISOToWeek org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToWeek(); DEFINE ISOToDay org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToDay(); DEFINE ISOToHour org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToHour(); DEFINE ISOToMinute org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToMinute(); DEFINE ISOToSecond org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToSecond(); ISOin = LOAD 'test.tsv' USING PigStorage('\t') AS (dt:chararray, dt2:chararray); DESCRIBE ISOin; ISOin: {dt: chararray,dt2: chararray} DUMP ISOin; (2009-01-07T01:07:01.000Z,2008-02-01T00:00:00.000Z) (2008-02-06T02:06:02.000Z,2008-02-01T00:00:00.000Z) (2007-03-05T03:05:03.000Z,2008-02-01T00:00:00.000Z) ...
ISOToHour ISOToHour truncates an ISO8601 datetime string to the precision of the hour field Jodatime: http://joda-time.sourceforge.net/ ISO8601 Date Format: http://en.wikipedia.org/wiki/ISO_8601 Example usage: REGISTER /Users/me/commiter/piggybank/java/piggybank.jar ; REGISTER /Users/me/commiter/piggybank/java/lib/joda-time-1.6.jar ; DEFINE ISOToYear org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToYear(); DEFINE ISOToMonth org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToMonth(); DEFINE ISOToWeek org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToWeek(); DEFINE ISOToDay org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToDay(); DEFINE ISOToHour org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToHour(); DEFINE ISOToMinute org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToMinute(); DEFINE ISOToSecond org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToSecond(); ISOin = LOAD 'test.tsv' USING PigStorage('\t') AS (dt:chararray, dt2:chararray); DESCRIBE ISOin; ISOin: {dt: chararray,dt2: chararray} DUMP ISOin; (2009-01-07T01:07:01.000Z,2008-02-01T00:00:00.000Z) (2008-02-06T02:06:02.000Z,2008-02-01T00:00:00.000Z) (2007-03-05T03:05:03.000Z,2008-02-01T00:00:00.000Z) ...
ISOToMinute ISOToMinute truncates an ISO8601 datetime string to the precision of the minute field Jodatime: http://joda-time.sourceforge.net/ ISO8601 Date Format: http://en.wikipedia.org/wiki/ISO_8601 Example usage: REGISTER /Users/me/commiter/piggybank/java/piggybank.jar ; REGISTER /Users/me/commiter/piggybank/java/lib/joda-time-1.6.jar ; DEFINE ISOToYear org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToYear(); DEFINE ISOToMonth org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToMonth(); DEFINE ISOToWeek org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToWeek(); DEFINE ISOToDay org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToDay(); DEFINE ISOToHour org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToHour(); DEFINE ISOToMinute org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToMinute(); DEFINE ISOToSecond org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToSecond(); ISOin = LOAD 'test.tsv' USING PigStorage('\t') AS (dt:chararray, dt2:chararray); DESCRIBE ISOin; ISOin: {dt: chararray,dt2: chararray} DUMP ISOin; (2009-01-07T01:07:01.000Z,2008-02-01T00:00:00.000Z) (2008-02-06T02:06:02.000Z,2008-02-01T00:00:00.000Z) (2007-03-05T03:05:03.000Z,2008-02-01T00:00:00.000Z) ...
ISOToMonth ISOToMonth truncates an ISO8601 datetime string to the precision of the month field Jodatime: http://joda-time.sourceforge.net/ ISO8601 Date Format: http://en.wikipedia.org/wiki/ISO_8601 Example usage: REGISTER /Users/me/commiter/piggybank/java/piggybank.jar ; REGISTER /Users/me/commiter/piggybank/java/lib/joda-time-1.6.jar ; DEFINE ISOToYear org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToYear(); DEFINE ISOToMonth org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToMonth(); DEFINE ISOToWeek org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToWeek(); DEFINE ISOToDay org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToDay(); DEFINE ISOToHour org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToHour(); DEFINE ISOToMinute org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToMinute(); DEFINE ISOToSecond org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToSecond(); ISOin = LOAD 'test.tsv' USING PigStorage('\t') AS (dt:chararray, dt2:chararray); DESCRIBE ISOin; ISOin: {dt: chararray,dt2: chararray} DUMP ISOin; (2009-01-07T01:07:01.000Z,2008-02-01T00:00:00.000Z) (2008-02-06T02:06:02.000Z,2008-02-01T00:00:00.000Z) (2007-03-05T03:05:03.000Z,2008-02-01T00:00:00.000Z) ...
ISOToSecond ISOToSecond truncates an ISO8601 datetime string to the precision of the second field Jodatime: http://joda-time.sourceforge.net/ ISO8601 Date Format: http://en.wikipedia.org/wiki/ISO_8601 Example usage: REGISTER /Users/me/commiter/piggybank/java/piggybank.jar ; REGISTER /Users/me/commiter/piggybank/java/lib/joda-time-1.6.jar ; DEFINE ISOToYear org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToYear(); DEFINE ISOToMonth org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToMonth(); DEFINE ISOToWeek org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToWeek(); DEFINE ISOToDay org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToDay(); DEFINE ISOToHour org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToHour(); DEFINE ISOToMinute org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToMinute(); DEFINE ISOToSecond org.apache.pig.piggybank.evaluation.datetime.truncate.ISOToSecond(); ISOin = LOAD 'test.tsv' USING PigStorage('\t') AS (dt:chararray, dt2:chararray); DESCRIBE ISOin; ISOin: {dt: chararray,dt2: chararray} DUMP ISOin; (2009-01-07T01:07:01.000Z,2008-02-01T00:00:00.000Z) (2008-02-06T02:06:02.000Z,2008-02-01T00:00:00.000Z) (2007-03-05T03:05:03.000Z,2008-02-01T00:00:00.000Z) ...
ISOToWeek ISOToWeek truncates an ISO8601 datetime string to the precision of the day field, for the first day of the week of the datetime.
ISOToYear  
 



Copyright © ${year} The Apache Software Foundation