Created on 10-14-2016 03:21 PM - edited 09-16-2022 03:44 AM
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?
Created on 01-18-2017 07:06 AM - edited 01-18-2017 07:07 AM
Thanks! We wrote a UDF, to handle this date convertion. It worked out well.
Thanks,
Krishna
Created 01-17-2017 05:46 PM
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.
Created on 01-18-2017 07:06 AM - edited 01-18-2017 07:07 AM
Thanks! We wrote a UDF, to handle this date convertion. It worked out well.
Thanks,
Krishna