- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Parquet Timestamp Inconsistent values Hive Vs AWS S3
- Labels:
-
Apache Hive
Created ‎07-01-2021 11:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi -
We are laoding data from sqoop to Hive table in parquest format where the dates are showing properly in hadoop.
We are distcping the data to AWS S3 and creating the tables in Athean using Glue Crawler.
When we query both tables(Hadoop & AWS) we are seeing different values for timestamp & date columns.
Hadoop Query Data:
SELECT effective_dt FROM "dbname"."table" where Pk_id='78393904'
output
0001-01-03 07:00:00.000
Athean Query Data
SELECT effective_dt FROM "dbname"."table" where Pk_id='78393904'
output
0001-01-01 12:00:00.000
Any suggestions how to overcome this issue.
Created ‎07-05-2021 10:47 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
By default hive displays in UTC. If you want to use specific timestamp,you can run below command
SELECT from_utc_timestamp(cast(from_unixtime(cast(1623943533 AS bigint)) as TIMESTAMP),"Asia/Kolkata") ;
