![](/img/trans.png)
[英]spark-hive - Upsert into dynamic partition hive table throws an error - Partition spec contains non-partition columns
[英]Add a dynamic partiton in in a static partition in a nested partition table?
我有一個包含嵌套分區的表,例如 -
我需要靜態添加第一層(國家/地區)(因為它們位於不同位置)但希望動態添加第二層(運行日期)。
我在下面嘗試過但它不起作用-
ALTER TABLE <table_name> ADD PARTITION (country=country1, run_date) LOCATION '<path>';
我認為 alter table for hive 中沒有動態分區選項。
但是,我從您的要求中了解到的可能如下所示。
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.