Member since
10-13-2020
2
Posts
0
Kudos Received
0
Solutions
10-13-2020
04:44 AM
sql i am using select cast(from_unixtime(unix_timestamp(date_with_am,'MM-dd-yyyy HH:mm a'), 'yyyy-dd-MM HH:mm:ss')) date_with_am, Employee_Name as employee_name, Email as email, cast(from_unixtime(unix_timestamp(term_date,'MM-dd-yyyy'), 'yyyy-dd-MM HH:mm:ss')) as term_date, from table;
... View more
10-13-2020
04:42 AM
Hello Team I have a requirement to pull data in csv format and load to hive In csv we have 10 columns amoung which 2 columns are with date format format are MM-dd-yyyy HH;MM AM/PM anf MM-dd-YYYY respectively i need to cast these columns from string to timestamp format in hive. i tried to tweek the sql either i get null values for few records or below error Failed with exception java.io.IOException:org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.ClassCastException: org.apache.hadoop.io.Text cannot be cast to org.apache.hadoop.hive.serde2.io.TimestampWritable
... View more
Labels:
- Labels:
-
Apache Hive