Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
soumroy7
Contributor II
Contributor II

Read QVD names and store in temp table

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

Labels (2)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

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;

View solution in original post

4 Replies
Vegar
MVP
MVP

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;

soumroy7
Contributor II
Contributor II
Author

Thanks a lot. This helps
soumroy7
Contributor II
Contributor II
Author

Thanks a lot. This helps alot

Vegar
MVP
MVP

That's great to hear.

I usually do something like this for every qvd I store in my extract and transform applications.