hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AnandaVelMurugan Chandra Mohan <ananthu2...@gmail.com>
Subject insert timestamp values in Hive
Date Tue, 27 Oct 2015 00:49:16 GMT
Hi,

I believe my Hive version is Apache 1.2.0. I guessed it from the folder and
hive-hwi.jar names.

I am trying to insert values into a column of type timestamp. It does not
work

This is how I create the table
CREATE TABLE tmp (reporttime timestamp);

I tried following insert queries
INSERT INTO TABLE tmp VALUES(734196.3552);

INSERT INTO TABLE tmp VALUES(734196);

I read that values of timestamp could be integers which are interpreted as
seconds since unix epoch time or float which are interpreted as seconds
since unix epoch time with nanasecond precision or string of format
'YYYY-mm-dd'. I cannot use third string option as of now. So I am trying
other two options i.e. int and float.

When I do a select query, I get null

I tried

select to_date(reporttime) from tmp
select reporttime from tmp

Please help if you have any idea.
-- 
Regards,
Anand

Mime
View raw message