Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive, mail # user - Not able to use the timestamp columns


Copy link to this message
-
Not able to use the timestamp columns
Dileep Kumar 2013-03-05, 22:58
Hi All,

I am looking for some help in using timestamp column and not sure why I am
getting this error:
Here are how I created the tables and how I am querying it
--hdfs dfs -mkdir /hive/tpcds/date_ts

create external table date_ts
(
    d_date                    timestamp
)
row format delimited fields terminated by '|'
location '/hive/tpcds/date_ts';
hive -e "select * from date_ts"
Logging initialized using configuration in
file:/etc/hive/conf.dist/hive-log4j.properties
Hive history
file=/tmp/cloudera/hive_job_log_cloudera_201303052251_950655265.txt
OK
Failed with exception
java.io.IOException:java.lang.IllegalArgumentException: Timestamp format
must be yyyy-mm-dd hh:mm:ss[.fffffffff]
Time taken: 3.556 seconds
[cloudera@localhost tmp-work]$ hdfs dfs -cat /hive/tpcds/date_ts/*
2415022|AAAAAAAAOKJNECAA|1900-01-02
02:00:21.000000000|0|1|1|1900|1|1|2|1|1900|1|1|Monday|1900Q1|N|N|Y|2415021|2415020|2414657|2414930|N|N|N|N|N|