Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Impala Timestamp - non-zero padded issue

avatar
Rising Star

Hey Guys - we have data, where the timestamp field is of datatype string, the values are non-zero padded timestamps. 

 

For Example:

1/1/2015 1:34:45 PM

1/10/2014 1:02:45 AM

11/1/2014 11:04:45 AM

 

When we do a cast as timestamp, we get NULL result - reason begin, impala expects the day and month values to be 2 digit, that is zero-padded. Is there a Regex function that will allow me to parse these non-zero padded timestamp to zero-padded and then convert to timestamp datatype?

1 ACCEPTED SOLUTION

avatar
Rising Star
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
2 REPLIES 2

avatar
Contributor

When Hive stores a timestamp value into Parquet format, it converts local time into UTC time, and when it reads data out, it converts back to local time.

avatar
Rising Star
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login