Loop on Months at Sequence
Posted: Mon Jan 26, 2015 10:15 am
Hi,
I have my data source as sequential files. They are monthly files with such a file name structure 'KPI_20140501.txt'. The requirement is to load multiple months during one run. The input parameter is DateFrom & DateTo.
I have daily files and in order to loop on them for a week for example, I'm converting the input DateFrom & DateTo to Iconv format then looping on them by incrementing one.
I want to apply the same logic for monthly files, but have no clue how to loop on months as converting them to Iconv won't fix the issue.
For example, how to loop on below files three times only? (Days are always fixed to '01')
KPI_20140501.txt
KPI_20140601.txt
KPI_20140701.txt
Parameters:
DateFrom Parameter is '2014-05-01'
DateTo Parameter is '2014-07-01'
Regards
I have my data source as sequential files. They are monthly files with such a file name structure 'KPI_20140501.txt'. The requirement is to load multiple months during one run. The input parameter is DateFrom & DateTo.
I have daily files and in order to loop on them for a week for example, I'm converting the input DateFrom & DateTo to Iconv format then looping on them by incrementing one.
I want to apply the same logic for monthly files, but have no clue how to loop on months as converting them to Iconv won't fix the issue.
For example, how to loop on below files three times only? (Days are always fixed to '01')
KPI_20140501.txt
KPI_20140601.txt
KPI_20140701.txt
Parameters:
DateFrom Parameter is '2014-05-01'
DateTo Parameter is '2014-07-01'
Regards