Skip to main content
Charles_Bannon
Employee
Employee

As QlikView Developers, we are often asked to supply the source data files for applications on the demo.qlik.com site. Since most applications are able to be downloaded locally, I figured I would let you in on a little secret. You can create the data files yourself and it is a fairly simple process. The QlikView scripting statement that will help you achieve your desired results is the STORE statement.

QlikView help states that a QVD or a CSV file can be created by a store statement in the script. The statement will create an explicitly named QVD or CSV file. The statement can only export fields from one logical table. The text values are exported to the CSV file in UTF-8 format. A delimiter can be specified, see Load. The store statement to a CSV file does not support BIFF export.

Examples:

Store mytable into xyz.qvd (qvd);

Store * from mytable into xyz.qvd;

Store Name, RegNo from mytable into xyz.qvd;

Store Name as a, RegNo as b from mytable into xyz.qvd;

store mytable into myfile.txt (txt);

store * from mytable into myfile.txt (txt);

(The two first examples have identical function.)

So let’s walk through the process.

1.    Open a new QVW and binary load the original app.

2.    Identify the table(s) that you would like to extract. (Table viewer).

3.    In the script you will either have to enter a Store statement for every table that you would like to extract.

Blog Post.png

Or you could use this snippet of script that will extract all tables from the original app

Blog Post2.png

4.    Reload the application.

After the reload, the extracted files will be placed in the same folder as the reloaded QVW. Now go ahead and try it for yourself.

Happy Qlikking!

6 Comments
Anonymous
Not applicable

Great Idea.

Thank you.

CB.

0 Likes
1,323 Views
Not applicable

Excellent Charles

0 Likes
1,323 Views
thanstad
Creator
Creator

Fantastic, I have been struggling with this for a few weeks because I needed to get data from different fields in my model to an complete data source. I assume it should be quiet easy to make a new table with a concatenate load from different previous store(s).

Tormod Hanstad

0 Likes
1,323 Views
Not applicable

Hi Sir

I am not quite sure the purpose. for my case i have a qv QVW file , i use binary load to read all the table , and i store the 10 table into different name. why not from the QVW file , use the store command to store the table . what it the diff ? i am a bit confuse .

0 Likes
1,323 Views
kouroshkarimi
Creator III
Creator III

The methods are very similar, with Binary Load you load the data model as it exists in the source application. You can then use functions such as RENAME to change table / field names. Saving the individual tables to a network address will obviously eat additional space on your drive and is more verbose to achieve the same goal, but gives you more flexibility in what parts of the model you want to load.

I would say if you only need to make a small amount of changes to the source data model then use Binary. If you need to tweak a lot of fields / tables and drop certain fields then STORE / load from QVDs.

Another thing to take into consideration is the performance difference between the two approaches. I'm assuming Binary will be quicker because it does not hit a NAS / local drive and you might not use an optimized load on all your QVDs.

0 Likes
1,323 Views
rbecher
MVP
MVP

Years ago I have build a QVWDataExtractor: QlikView App: TIQView Tools v2

Maybe someone finds this useful..

1,323 Views