如何通过更改日期列将数据插入配置单元表?

时间:2019-04-11 12:37:34

标签: hive

我是Hive的新手。我需要通过更改日期列将数据插入表中。我在下面的代码中尝试了它不起作用:

insert into table t1 
select * from tt2 
alter t1.fulldate = 2018-07-31 00:00:00.0 timestamp;

感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

在您选择的查询 specify all column names 中,对于fulldate列,将值保留为required timestamp value

尝试以下语法:

insert into table t1 select col1,col2,timestamp(2018-07-31 00:00:00.0) fulldate from tt2;