Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us for a live Q&A! September 21, 10 AM ET - Onboarding Fast in Qlik Sense SaaS! REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
deepanshu_chamo1
Contributor
Contributor

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
deepanshu_chamo1
Contributor
Contributor
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!!

oscarmqz
Creator III
Creator III

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/