設為首頁收藏本站

艾歐踢論壇

 找回密碼
 立即註冊

QQ登錄

只需一步,快速開始

搜索
熱搜: 活動 交友 discuz
查看: 582|回復: 0
打印 上一主題 下一主題

How Do I Create &Use A QVD?

[複製鏈接]
跳轉到指定樓層
樓主
發表於 2018-2-1 21:02:16 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
Typically QVDs are created during the execution of your QlikView load script. A STORE statement writes the current contents of a single table in your data model to a file on the disk.
The syntax for this is:
STORE TableName INTO ..\Data\FileName.qvd (QVD);
Note that the STORE command can also be used to write data into a comma or tab delimited file – but that is a topic for another blog post.

QVDs can be created during the execution of any QlikView load script, but best practice is to have separate applications which deal solely with the creation of QVD files.
This “extraction layer” then handles all interaction with source databases.
Depending on the size and complexity of the data being loaded I may create one app for each table being extracted or a single app may create all QVDs for the solution (or anything else  in between).
What is important though is that the front end can be reloaded quickly from locally stored data files. This ability to refresh the presentation layer quickly can massively speed up development.

How Do I Use My QVDs?
Once you have created a data layer consisting of a number of QVDs you simply load from each QVD file in the same way you would a CSV or Excel file. The syntax is:

TableName:
LOAD
FieldList
FROM ..\Data\FileName.qvd (qvd);


Note that where with CSV or Excel files the load statement contains a chunk of information about file formats this is not required with a QVD load.
You can also use the wizard in the load script by clicking the File button and locating the QVD in the folder browser.

When loading from a QVD you can apply a number of transformations, such as renaming columns, excluding rows and adding derived columns.
Be aware though that many of these transformations will cause your QVD load to be non-optimised (which will make the load up to 100 times slower)
please see this blog post for more information: QlikView Optimised Loads.

By loading from multiple QVD’s into a single application you can build up your associative data model.
This could involve some data from QVDs (perhaps originally from different data sources) and maybe some small lookup type data values from yet another source.

As well as being a very quick way of loading data into QlikView apps QVDs can also be useful for archive – due to the excellent compression which is used in their creation.
You could, for example, store dated copies of a data set into QVDs;
your front end would then typically work off the latest version, but it would be possible to point it to an archive version of the data if required.
分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏 轉播轉播 分享分享 分享淘帖
回復

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 立即註冊

本版積分規則

小黑屋|Archiver|手機版|艾歐踢創新工坊    

GMT+8, 2024-5-16 19:19 , Processed in 0.243658 second(s), 19 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回復 返回頂部 返回列表