I have a table that has nested partitions like -
- country1
- run date 1
- run date 2
- country2
- run date 1
- run date 2
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.