简体   繁体   English

将数据从分区表加载到非分区表

[英]Loading data from partitioned to non partitioned table

I want to load a data from Partitioned table to Non partitioned Hive tables. 我想将数据从分区表加载到非分区Hive表。 Is there anyway to load it instead of converting non-partitioned into partitioned table? 无论如何有加载而不是将非分区表转换为分区表吗?

Thanks, Rahul 谢谢,拉胡尔

Are you need partition columns( from partitioned table) as non-partitions columns into new table(non-partitioned) ? 您是否需要将分区列(来自分区表)作为非分区列添加到新表(非分区)中? If yes, then below format will help. 如果是,则以下格式将有所帮助。

CREATE [EXTERNAL] TABLE table_name [STORED AS ctas_file_format] [LOCATION 'hdfs_path'] AS select * from partitioned_table 创建[外部]表table_name [存储为ctas_file_format] [位置'hdfs_path'] AS select * from partitioned_table

I think you can use hdfs command to move the data to non-partitoned table. 我认为您可以使用hdfs命令将数据移动到非分区表中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM