Ironman
Ironman

Reputation: 1410

Insert Timestamp in Hive table

i am trying to create a hive table where i am putting data from my hdfs, but while inserting the data i want to add the data insertion time in my table. I don't know how to do it, if you guys can help it would be wonderful. Thanks

Upvotes: 0

Views: 1713

Answers (1)

user3484461
user3484461

Reputation: 1143

from_unixtime(unix_timestamp()) this would insert the timestamp in your table.

select column1 ,columns2 , from_unixtime(unix_timestamp()) as timestamp from table, would work for you.

Upvotes: 1

Related Questions