Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How does one go about exporting data that's already part of the app?
For example, I have previously loaded data in a table called "Delivery", and at the beginning of the script I want to export it.
I tried this
which resulted in
All the examples I've found are using Store after tables are loaded in the script, in this case I want to export what I have first before importing anything.
Regards,
Mike
Mike,
Do not worry about "novice" part. You are doing pretty good for the guy without any official training... 🙂
For your case:
1. You can always do a full reload for the data you are getting every week. It simplifies the script development and limits sync issues. Disadvantages: the load might take too long...
2. You can do an incremental load for a new data (if you don't need to "update" the existing records and just load the portion for the current week). In this case you can create a new field in the script:
//Initial LOAD
Data:
Load
....
num(date_field) as Current_Date
// or date(date_field) as Current_Date
from (RAW_DATA_SOURCE);
//Assuming you do have some kind of "date_field" in your data....
// store the result data
STORE DATA into DATA.QVD (qvd);
// incremental load
// load the existing data first
DATA:
LOAD
*
From DATA.QVD;
vToday = num(today());
// LOAD data from new week
Data:
Load
....
num(date_field) as Current_Date
from (RAW_DATA_SOURCE)
where Current_Date > $(vToday)
;
Again, it might complicate your script and needs to be carefully structured (especially considering dates' fields),
but it should help you to reduce the loading time significantly.
Regards,
VK
May be use this with Binary load?
Thanks Sunny, but I must be missing something. If I don't have a .qvd to begin with, I'm not sure how I would do a binary load.
Binary load uses qvw and not qvd. You do have a qvw, right? Read here:
https://www.analyticsvidhya.com/blog/2015/03/qlikview-binary-load/
No, I don't. I'm new to Sense and have never used View.
Qlik Sense can do Binary load also:
Mike,
You do not need a word "FROM" and '*' in your STORE statement.
The correct syntax is (for a table named "Calendar"):
STORE Calendar into FiscalCalendar.csv' (TXT, delimiter is ',');
STORE Calendar into FiscalCalendar.QVD' (QVD);
Regards,
Vlad
I am also trying to understand what do you mean by "I want to export what I have first before importing anything."
Could you please give more details on that?
Are you loading a data, doing some transformations and trying to store it after that?
Or it's more complicated process?
VK
Hi Vladimir,
The syntax change made no difference - same error, according to the Store online help, the're syntactically equivalent.
By "I want to export what I have first before importing anything", what I mean is that I want to export out of Sense any data that is part of the application as the first step of a script - to create a backup of existing application data before it is overwritten.
I'm starting to think that's not the way it works, that I would need to load data from the qvd first then export.
For Binary Load, check the link below...
For storing a table into QVD uset he below syntax
store [Delivery] into [lib://QVD Path/[Delivery].qvd] (qvd);
To store a QVD, you'll need to make a new connection as shown in above link and use LIB command again to store.