I have my data folder in the below structure with 2 years data(2015-2017).
AppData/ContryName/year/month/Day/app1.json
For eg:
AppData/India/2016/07/01/geek.json
AppData/India/2016/07/02/geek.json
AppData/US/2016/07/01/geek.json
Now I have created an external table with partition.
PARTITIONED BY (Country String, Year String, Month String, day String)
After this, I need to add the partition in alter table statement.
ALTER TABLE mytable
ADD PARTITION (country='India', year='2016',month='01', day='01')
location 'AppData/India/2016/07/01/'
Create add partition script to each and every day is not possible,
Is there any simplest way to achieve this?