Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Data load

Hello All,

Please help me in the incremental data load.


I have declared the variable which pulls the max. date, then used this variable in main script.


The issue I am facing is that when I first upload the data it loads the new data correctly

When I reload the data it shows that no data is loaded i.e. 0 lines fetched but it removes the old data.

When I reload the data again it pulls all the data from the starting

I want that it pulls the new data only. When I reload the data it pulls zero lines with old data in it and this process repeats again and again

LOAD SCRIPT:


LIB CONNECT TO 'TIGUNVMBGWL0011';

LOAD CustomerName,

    ContactName,

    POSTDATE;

SQL SELECT CustomerName,

    ContactName,

    POSTDATE

FROM msdb.dbo.Customers

Where POSTDATE >'$(Last_Update_Date)';

VARIABLE:


Last_Update:

LOAD Max(POSTDATE) as maxdate

resident Customers;

Let Last_Update_Date = Date(peek('maxdate',0,'Last_Update'),'YYYY-MM-DD');

Please find the snapshot of the load

  1. When I load the data first time it loads the new data only
  2. When I reload the data it show 0 lines fetched
  3. When I reload the data it loads all the data

Please help an guide me where I correct myself

reddys310

New to Qlik Sense

11 Replies
Anonymous
Not applicable
Author

Thanks a lot sir!!

Just a small query, if the QVD does not exist and I want that pass the variable which dynamically pull the data from the first day.. if yes then how??

Thanks again!!

Anonymous
Not applicable
Author

take this line of the script out into an include file so you can modify it externally

Let Last_Update_Date = '2000/01/01'; //Use whatever date you want here to pull all your data from database

https://www.quickintelligence.co.uk/qlikview-include-files/