I have data for 4 years. Like
'2011
2012
2013
2014'
I have to run queries based on one month's data. So i am creating partitions as below.
'ALTER TABLE table1_2010Jan ADD PARTITION(year='2010', month='01', day='01')
LOCATION 'path';
ALTER TABLE table1_2010Jan ADD PARTITION(year='2010', month='01', day='02')
LOCATION 'path';
ALTER TABLE table1_2010Jan ADD PARTITION(year='2010', month='01', day='03')
LOCATION 'path';'
I am creating individual partitions like above for every day of every month.
I want to know if we can write a script(any language) an run it one time to create these partitions for the all the days of a month for every year? Or is there a way to do this in hive itself.
Any suggestions please..