Creating QVDs

As in the previous post you have seen that how we connected to the database and fetched the table, its now time to store that table in our local machine. Since Qlikview has the concept of in memory(here the link to the in memory chapter should be embedded), it is built to store each of the data locally so that it does not requires hitting the database again and again when we view the applications.
Consider a scenario where we have multiple Qlikview documents, each using the table “ABC”. In each of the Qlikview document we need to create a connection to the database and fetch the table. In other words, we need to hit the database each time for each of the QVW. In real time scenario this is not a feasible approach. Hence in order to eliminate this burden on the database, qlikview allows us to store the tables into QVD and use the QVD in each application.
Note: QVD (Qlikview Data) file allows the data to be stored in the compressed form. The data is compressed and the size of the QVD reduces drastically. Thus the size of the memory is also reduced. Reading data from a QVD file is typically 10-100 times faster than reading from other data sources. By using QVDs we can also implement Incremental Loads(link to Incremental Link chapter).
So coming back to storing the table, we can now use the keyword STORE to store the fetched table into QVD. In order to store the fetched table, we need to give the table a specific name. The name is given succeeded by colon (:) sign as follows:

Bookstore:
SQL SELECT *
FROM
"E:\ABC\Northwind\bookstore".Authors;

This name(Bookstore) will be used in STORE command as follows:

STORE Bookstore into E:\ABC\Qlikview\QVD\Bookstore.qvd(qvd);

You can see (qvd) at the end of the STORE statement. This indicates that the type of the file stored is qvd.


Now reload the application as shown in the previous chapter. You could see the file created at the path E:\ABC\Qlikview\QVD with the name Bookstore and its file type is qvd. If you see the size of the created QVD and the size of the actual table, you will find much difference. This is because of the compression factor of the QVD. This QVD can be used at multiple locations without hitting the database.
Share on Google Plus

About Unknown

    Comment HERE
    Facebook Comment

0 comments:

Post a Comment