Both QlikView and Qlik Sense can interchangeably use QVD files. If you have QVD files created by QlikView and if you are embarking on Qlik Sense to develop new applications, you can leverage existing QVD files.
That said, you may want to create a Qlik Sense application to show QVD metadata from all extract layer QVD files so that developers can get some metadata information such as table name, field name, number of fields and number of rows.
Let’s go through the script step-by-step.
Load data from all QVD files in a folder
// Load QVD files
set vQVDPath = ‘lib://QVDFiles\’;
load * from $(vQVDPath)*.qvd(qvd);
Neseted FOR loops to extract QVD metadata
// Extract metadata from each QVD file
for t=0 to NoOfTables() – 1
for f=1 to NoOfFields(TableName($(t)))
Let fname = FieldName($(f), TableName($(t)));
Let tname = TableName($(t));
QVDMetadata:
load
// table name
‘$(tname)’ as QVDName,
// field name
FieldName($(f),’$(tname)’) as [Field Name],
// no of rows
NoOfRows(‘$(tname)’) as [Number of Rows],
// load date
today() as LoadDate
AutoGenerate 1
;
// Create a concatenated list of values for each field
Fieldvalues:
Load
FieldName($(f), '$(tname)') as [Field Name],
concat(distinct [$(fname)], '-') as values
Resident $(tname);
next f
next t
Fields:
Load [Field Name],
subfield(values, ‘-‘) as Fieldvalues
Resident Fieldvalues
where match([Field Name], ‘Country’, ‘City’)
;
exit Script
;
Now, you can create a pivot table to show QVD name, field name along with field values.

QVD Metadata
Attend our live training and let us help you become an awesome Qlik developer
Please visit the following links to learn more about these live training and register if you are interested in these courses.
PS: You are not required to make any payment now.
We have added as much information including downloadable curriculum in order to help you determine if these courses are for you or not.
If you attend a live training, you will also receive these additional benefits:
- One Year FREE Pro membership to Analyticshub.io ($180 value)
- One Qlik Sense Certification Project with live support ($250 value)
I see errors in your script.
Where are the keywords “Let” in the calculation of variables?
It is at least not professional.
Sorry for my bad english.
Thank you, Alexander. My apology to miss that while cutting and pasting it. It’s been fixed now.