Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

Parquet Timestamp Inconsistent values Hive Vs AWS S3

avatar
Frequent Visitor

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.

1 REPLY 1

avatar
Guru

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") ;