Article Number: 000010330 | Last Modified: 2019/04/01
Description
Qlik Data (QVD) files contain a XML header with meta data describing the binary data stored in the file. The XML header can be extracted into QlikView or Qlik Sense by loading the QVD file as a XML formatted source.
Two separate loads are required to get the basic details of a QVD file. These extract the meta data on table level and on field level.
The below example shows how to extract meta data from a QVD file, and storing it incrementally to a QVD file for analysis over time. Notice, the QVD file paths need to come form a library reference in Qlik Sense
SET vPathToSourceQvdFile = 'Transactions.qvd'; // QLIKVIEW PATH. QVD file to read meta data from SET vPathToMetaDataQvdFile = 'QvdMetaData.qvd'; // QLIKVIEW PATH. QVD file for storing meta data
SET vPathToSourceQvdFile = 'lib://ApplicationFolder/Transactions.qvd'; // QLIK SENSE PATH. QVD file to read meta data from SET vPathToMetaDataQvdFile = 'lib://ApplicationFolder/QvdMetaData.qvd'; // QLIK SENSE PATH. QVD file for storing meta data
QvdMetaData: LOAD QvBuildNo, // QlikView version used by the QVD creator CreatorDoc, // Path to QVW that genrated the QVD CreateUtcTime, // UTC time of QVD file creation TableName, // Source table stored into the QVD NoOfRecords // Number of records in the QVD file FROM [$(vPathToQvdFile)] (XmlSimple, Table is [QvdTableHeader]);
JOIN LOAD FileName() AS FileName, // Name of the QVD file FieldName, // Field name in the stored table NoOfSymbols // Number of symbols FROM [$(vPathToQvdFile)] (XmlSimple, Table is [QvdTableHeader/Fields/QvdFieldHeader]);
// Load previous meta data SET ErrorMode = 0; // Disable error message. Required to avoid error on first reload when source QVD does not exist LOAD * FROM QvdMetaData.qvd (QVD); // Load previous meta data, to create incremental data SET ErrorMode = 1; // Enable error message
STORE QvdMetaData INTO QvdMetaData.qvd (QVD); // Store incremental meta data to file
Get Answers
Find Answers
Qlik Community
Collaborate with over 60,000 Qlik technologists and members around the world to get answers to your questions, and maximize success.
Experiencing a serious issue, please contact us by phone. For Data Integration related issues please refer to your onboarding documentation for current phone number.