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

Incremental Load

Hi

I have following sales data going back to year 2014.  The actual model i have takes an hour to reload as it reloads all the data.  I want to reduce the reload time by applying incremental reload.  How do i accomplish this.  Basically, the incremental reload should be the last sales date.

Attached herewith is the data.

Kind regards

Nayan

1 Solution

Accepted Solutions
its_anandrjs

Check the attached file

First initially load all data and then incremental load data with max date by finding max date by variables and then comment initial load table.

MaxDateTab:

LOAD Date(Max(Date)) as MaxDate FROM SalesData.qvd(qvd);

LET vMaxDate = Peek('MaxDate',0,'MaxDateTab');

//Incremental Load

Data:

LOAD Date,

    [Sales Amount]

FROM

[Sales Data.xlsx]

(ooxml, embedded labels, table is Sheet1)

Where Date > '$(vMaxDate)';

Concatenate(Data)

LOAD * FROM SalesData.qvd(qvd);

Store Data into SalesData.qvd;

DROP Table Data;

View solution in original post

10 Replies
prma7799
Master III
Master III

Also go through this

Anonymous
Not applicable
Author

Thank you.  Will let you know if I'm successful.

Kind regards

Nayan

prma7799
Master III
Master III

Ok ... Good.

its_anandrjs

Check the attached file

First initially load all data and then incremental load data with max date by finding max date by variables and then comment initial load table.

MaxDateTab:

LOAD Date(Max(Date)) as MaxDate FROM SalesData.qvd(qvd);

LET vMaxDate = Peek('MaxDate',0,'MaxDateTab');

//Incremental Load

Data:

LOAD Date,

    [Sales Amount]

FROM

[Sales Data.xlsx]

(ooxml, embedded labels, table is Sheet1)

Where Date > '$(vMaxDate)';

Concatenate(Data)

LOAD * FROM SalesData.qvd(qvd);

Store Data into SalesData.qvd;

DROP Table Data;

Anonymous
Not applicable
Author

Thank you Anand for your reply, i will let you know. 

By the way, on the Incremental Load Script, will it be better to use an " Where Exist" expression as it will only look at the max date reload data and as compared to just a "Where" Expression, where it will load all data and then reduce to a max date.  Am I correct?

Kind regards

Nayan

its_anandrjs

Exactly but in your requirement you are want to load the data with Maxdate which is Max date for one day, Right. so in this you have to find only Max Date and load your latest available dates from the table and concatenate with the previous (History Qvd).

Anonymous
Not applicable
Author

Thank you for the feedback.  Will the reload time be shorter?

Kind regards

Nayan

Anonymous
Not applicable
Author

Hi Anand

The reload time is shorter. 

Kind regards

Nayan