Hadoop Pig ISO Date to Unix Timestamp

I have a list of items in Pig consisting of date strings in ISO 8601 format (YYYY-MM-DD):

(2011-12-01) (2011-12-01) (2011-12-02) 

Is there a way to convert these elements to UNIX timestamps besides implementing my own functions in Java?

+4
source share
1 answer

You need UDF to do this = Good news he has already done. The pig also comes with a “ piggybank” UDF contributed by the community, including date convert

+6
source

Source: https://habr.com/ru/post/1387427/


All Articles