gpt4 book ai didi

sql - 复制的数据列未在Hive的目标表中分区

转载 作者:行者123 更新时间:2023-12-02 22:03:05 25 4
gpt4 key购买 nike

我使用以下命令从现有分区表中的配置单元中创建了一个表

create table new_table As select * from old_table;

记录计数在两个表中都匹配,但是当我提供DESC表时,我可以看到该列未在New表中进行分区。

最佳答案

创建表时,您应明确指定partition列。

create table new_table partitioned by (col1 datatype,col2 datatype,...) as  
select * from old_table;

关于sql - 复制的数据列未在Hive的目标表中分区,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48129171/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com