[英]Add a dynamic partiton in in a static partition in a nested partition table?
I have a table that has nested partitions like -我有一个包含嵌套分区的表,例如 -
I need to add the first layer(country) statically (as they are in different locations) but want the 2nd layer(run dates) to be added dynamically.我需要静态添加第一层(国家/地区)(因为它们位于不同位置)但希望动态添加第二层(运行日期)。
I have tried below but its not working-我在下面尝试过但它不起作用-
ALTER TABLE <table_name> ADD PARTITION (country=country1, run_date) LOCATION '<path>';
I don't think there is dynamic partition option in alter table for hive.我认为 alter table for hive 中没有动态分区选项。
However what I understand from your requirement may be something like below.但是,我从您的要求中了解到的可能如下所示。
insert into nested_part partition(country='count1',run_date) select name,id,run_date from source4_nesting where country='count1';
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.