I'm dumping an excel file every week on Saturday. These files will have this naming convention: "ALL_OPEN_AR_YYYYMMDD"
This means that there will be 4 files a month that I'm looking to incrementally load and combine into one QVD. It appears that my script is looking for the specific dates and when the file name isn't there, it errors and stops loading.
I'm hoping I can tell it to grab all files within vFromDate and vToDate
LET external_tablename = Subfield(SubField(DocumentTitle(),'_L1_',1),'XLS.', -1);
LET _fwFullQVDName = '$(EXT_L1_Path)XLS.$(external_tablename).qvd';
Let vFromDate = Date(MonthName(AddMonths(Today(),-12)),'YYYYMMDD'); Let vToDate = Date(Today(),'YYYYMMDD'); Set vQVDLibraryAndFolder = 'lib://Revenue Cycle Dev/ExternalData\'; Set vQVDFileNameWithoutDateSuffix = 'ALL_OPEN_AR';
TempPartitionCalendar: Load Distinct Date((TempDate), 'YYYYMMDD') As PartitionYearMonth; Load Date(minDate + IterNo()) As TempDate While minDate + IterNo() <= maxDate;
Load Date#('$(vFromDate)','YYYYMMDD') as minDate, Date#('$(vToDate)','YYYYMMDD') as maxDate AUTOGENERATE (1);
For vIndex = 1 to FieldValueCount('PartitionYearMonth') Let vYearMonthSuffix = FieldValue('PartitionYearMonth',$(vIndex)); Let vQVDSource = '$(vQVDLibraryAndFolder)$(vQVDFileNameWithoutDateSuffix)_$(vYearMonthSuffix).xlsx';