Implement Incremental Load in Qlikview

qlikview
load

#1

Hi,

I have developed a Sales dashboard in Qlikview. I used to load all observations daily that takes good time. Now I want to resolve this using implement Incremental Load but I do not have Modification date in the source table. Below is the table structure.

Policy_ID (Numeric)
Name (Charatcer)
Sales (Numeric)
Product (Numeric)

I know one way of doing incremental load using modified date column. Can any one help me to solved this problem?

Thx,
Satish


#2

@Satish

If the tables not have a last updated date then it is good to create a table with ID and updated_date. Otherwise you could simply take rows with ID’s greater than the last ID pulled from the master database. Look at the below example:

Master Table

  Sales:
    LOAD Policy_ID, 
         Name, 
         Product, 
         Sales
    FROM Sales.qvd(qvd);

Identify Maximum Policy ID

Max:
load max(Policy_ID) as maxpolID
resident Sales;

Store Maximum Policy_ID in a variable and drop Max table

Let  vMax = peek('maxpolID',0,'Max');
 
Drop table Max;

Condition to load Policy_Id with greater than maximum Policy_Id

Transaction:
join(Sales)
 
LOAD Policy_ID, 
     Name, 
     Product, 
     Sales
FROM
[E:\Blogs\QlikView\QVD_Incremental_Load\Sales.xlsx]
(ooxml, embedded labels, table is Sheet1)
Where Policy_ID >'$(vMax)';

Hope this helps!

Regards,
Sunil