QlikView - Data files (QVD)


One of the important features of QlikView, which makes it so distinguished is the ability to store very large amount of data in a very compressed size and store it along with the QlikView documents. Therefore, once the document is created we need not connect to the data source, as the data is already stored along with the layout of the document. This is achieved through QVD file, which is a flat file stored with the .qvd extension. A QVD file stores data for one QlikView document and it is created using the script editor available in the QlikView document.

Advantages of Using QVD Files

The advantages of using QVD files in QlikView are as follows −

  • Faster Loading of Data
  • Gracefully support scaling up as the data volume grows
  • Used in incremental load
  • Data from multiple sources can be clubbed to one data set
  • Extract data in parallel

Creating QVD Files

QVD files are created using the STORE statement during the loading of QlikView files. This statement creates a single qvd file, which gets stored in the specified location as a file; separate than the QVW file through which it is created.

Given below is an example of storing the qvd file after the data is loaded into the QlikView document by reading a source file.

csv_to_qvd.JPG

Using QVD Files

A QVD file is loaded to a QlikView document in a similar way as other files like CSV, Excel and delimited files are used. We use the the Open option available under the File menu and browse for the QVD file we created before. On opening it gives us a window to see the data, select the column headers and do any data transformation required

open_qvd_file

QVD File Loader Script

On clicking Finish, the edit script window appears which shows the code used to load the QVD file. We can edit this code further. For example, to get only the few of the columns to be displayed or apply any inbuilt function etc. Click finish to load the file into the current QlikView document. Save the QlikView document as use_qvd.qvw.

qvd_file_load_script

Displaying Data from QVD File

Reload the document by using Control+R and choose the menu option Layout → New Sheet Objects → Table Box. A window appears showing all the columns from the table present in the QVD file. Select "Add All" to add all the columns to the display table. Use the "Promote/Demote" option to change the order of the columns. Click "Finish". The following screen appears showing the content of the QVD file.

qvd_file_data_table
Advertisements