- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Impala Timestamp - non-zero padded issue
- Labels:
-
Apache Impala
Created on ‎10-14-2016 03:21 PM - edited ‎09-16-2022 03:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks! We wrote a UDF, to handle this date convertion. It worked out well.
Thanks,
Krishna
Created ‎01-17-2017 05:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks! We wrote a UDF, to handle this date convertion. It worked out well.
Thanks,
Krishna
