簡體   English   中英

在嵌套分區表的靜態分區中添加動態分區?

[英]Add a dynamic partiton in in a static partition in a nested partition table?

我有一個包含嵌套分區的表,例如 -

  • 國家1
    • 運行日期 1
    • 運行日期 2
  • 國家2
    • 運行日期 1
    • 運行日期 2

我需要靜態添加第一層(國家/地區)(因為它們位於不同位置)但希望動態添加第二層(運行日期)。

我在下面嘗試過但它不起作用-

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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM