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.
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';
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.