Reputation: 3652
I'm trying to load a date field from PIG into a hive table, the PIG script has the field as:
testdate:chararray
The Hive table description is:
col_name data_type
testdate date
Pig 'chararray' type in column 0 cannot map to HCat 'DATE'type. Target filed must be of HCat type {STRING or CHAR or VARCHAR}
I looked up http://pig.apache.org/docs/r0.9.1/basic.html and discovered PIG does not have a format for date with HCatalog. What is the best solution for storing this value as a date in HIVE if I must use PIG? Thanks.
Upvotes: 0
Views: 583
Reputation: 3652
Ok I figured it out, since there is limited info on this topic:
I needed to use the DATETIME
instead of chararray
Upvotes: 1