Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am currently loading multiple QVDs(12 QVDs for each month) via for Loop in script. Filenames are like:
ABC_2019_01, ABC_2019_02 ..... and so on.
================================================
LET vFile='[ABC_*.qvd]';
FOR EACH vFile in FileList('ABC_*.qvd')
Load * FROM $(vFile)(qvd);
Next vFile;
NEXT vFile;
Till now it works fine. Now I want to read the latest filename (e.g. - 'ABC_2019_09') and store this QVD File Name in a temp table.
Can anyone help me with an example script for this
BR
Soumya
LET vFile='[ABC_*.qvd]';
FOR EACH vFile in FileList('ABC_*.qvd')
Load * FROM $(vFile)(qvd);
FileList:
Load
'$(vFile)' as FileName,
QvdNoOfRecords('$(vFile)') as NoOfRecords,
QvdNoOfFields('$(vFile)') as NoOfFields
Autogenerate 1;
Next vFile;
LET vFile='[ABC_*.qvd]';
FOR EACH vFile in FileList('ABC_*.qvd')
Load * FROM $(vFile)(qvd);
FileList:
Load
'$(vFile)' as FileName,
QvdNoOfRecords('$(vFile)') as NoOfRecords,
QvdNoOfFields('$(vFile)') as NoOfFields
Autogenerate 1;
Next vFile;
Thanks a lot. This helps alot
That's great to hear.
I usually do something like this for every qvd I store in my extract and transform applications.