I am trying to write hive o/p into HDFS csv file then there is change is date timestamp columnmillisecond is missing in csv fileHive : (1750-01-01 00:00:00.0)csv : (1750-01-01 00:00:00)
hive -e "INSERT OVERWRITE DIRECTORY '/path/date/tab1/'ROW FORMAT DELIMITEDFIELDS TERMINATED BY '|'STORED AS TEXTFILEselect * from table1 limit 5;"
123|1750-01-01 00:00:00.0||2029-09-09 14:29:44.0
csv file123|1750-01-01 00:00:00||2029-00-04 14:29:44
Can someone let me know how to write same o/p in CSV as we get using Hive?
Hive timestamp does support up to 9 digits decimal places (nano seconds)
For your case, maybe you can check whether for those timestamp with none-zero nano seconds, e.g. 1750-01-01 00:00:00.123456789, whether such data can be exported correctly
And for your example, 00:00:00.0 equals to 00:00:00, you didn't lose any precision, as it is zero nanosecond