Support Questions

Find answers, ask questions, and share your expertise

Invalid timestamp error while loading a file to AVRO format

avatar
New Contributor

I am getting below error message when trying to load a local file into HDFS in AVRO format.

Column is of time_stamp data type and i could observe a pattern of Jan 1st 00:00:00 for two records which are throwing error.

 

The column data type is BIRTH_DT TIMESTAMP(0,0,0). Please help me.

 

ERROR: '1982-01-01 00:00:00' for column 'BIRTH_DT' not of type TIMESTAMP, type enforced='1982-01-01 00:30:00

 

ERROR: '1933-01-01 00:00:00' for column 'BIRTH_DT' not of type TIMESTAMP, type enforced='1933-01-01 00:20:00

 

 

1 REPLY 1

avatar
Contributor

Can you provide more details on how you are trying to view the Avro file? And also it would be good to share the stack trace. i am assuming you are using Hive since you said that it is a column. Hive is schema on read so it will only evaluate the data when its read and not when its written in HDFS. Also good to check the timezone for timestamp format.

Hope this helps. If the comment helps you to find a solution or move forward, please accept it as a solution for other community members.