Category

Sunday, April 20, 2014

Qlikview Script from QVD Files

QlikView stores some metadata with qvd files in the qvd header section. This information is in the form of XML and includes name of thw qvw that generated qvd, field headers, length, format etc.
Along with this information, you will also find code that is used to create the qvd file like Load, SQL select statements and store statements along with database connection string.
There are 3 ways to get the script code from the qvd files.

Text editor: 
If the QVD file is moderately small size, you can simply open the  QVD file with Text editor like NotePad++ and look out the contents of the QVD file.  The file starts with xml version info followed  <QvdTableHeader> which marks beginning of the header section.
At the end of the header section, SQL statements, Load, Store statements and data base connect statements are enclosed between <Statment> </Statement> tags and <LineageInfo> </LineageInfo> tags.
Please be careful before opening any huge QVD file with text editor as it may freeze the system. The other options mentioned below are ideal to huge QVD files.

QlikView Desktop:
Click on Table Files in script window and select the QVD file. Once dialog window opens with QVD preview, select Xml radio button. Under the tables section, select  QvdTableHeader/Lineage/LineageInfo to view the code.
QVD import window

EasyQlik QViewer:
As mentioned in one of my earlier post, EasyQlik QViewer is an useful tool to view QVD contents.
Open the QVD file with EasyQlik QViewer tool and navigate to View -> File Metadata. It pops up a File Metadata window and displays the code.


Feel free to comment, if you are aware of any other method to get the code from QVD files.

No comments:

Post a Comment