Reputation: 2927
I have a list of items in Pig consisting of ISO 8601 (YYYY-MM-DD) formatted date strings:
(2011-12-01)
(2011-12-01)
(2011-12-02)
Is there any way to transform these items into UNIX timestamps apart from implementing my own functions in Java?
Upvotes: 4
Views: 6808
Reputation: 25909
You need a UDF to do that = The good news it has already been done. Pig also comes with "piggybank" UDFs contributed by the community including date convert
Upvotes: 6