Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
IMPORTANT: Upcoming LEF Database Maintenance, Oct. 3rd - SEE DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Specialist III
Specialist III

Implement Incremental Load

I have a excel file like

ID     Name    address

1           a              b

2          b             rgfr

3          c            dgr

4          d           gfrg

i have loaded this file in qlikview , now when i reload the script then it loads all the data , now please tell me how to implement incremental load on this type of table. Because there is no timestamp field but ID is Primary Key. Provide me script also.

thanks.

4 Replies
Highlighted
Partner
Partner

Hi

Store  MAX(ID) value in a variable.

Next time when u get data, get only those records which are greater than MAX(ID) and concatenate to previous table.

So that every time you reload you will get only incremented records.

Table1:

LOAD ID,

     NAME

FROM

(qvd);

LET vMaxID = Peek('ID',-1,'Table1');

Concatenate

LOAD ID,

     NAME

FROM

(ooxml, embedded labels, table is Sheet1)

Where ID>$(vMaxID);

STORE Table1 into F:\Manideep\qlikview practice\Incremental_Load\Updated_Data.qvd;

Hope this helps

Regards,

Manideep

Highlighted
Not applicable

Hi,

I tried this scrit executed.

Table1:

LOAD ID,

     Name,

     Address

FROM

(ooxml, embedded labels, table is Sheet1);

STORE Table1 into E:\QlikView\QVD\Updated_Data.qvd;

Table1:

LOAD  ID,

     Name,

     Address

FROM

(qvd);

Concatenate

LOAD ID,

     Name,

     Address

FROM

(ooxml, embedded labels, table is Sheet1)

Where not Exists(ID);

STORE Table1 into E:\QlikView\QVD\Updated_Data.qvd;

regards

mahesht

Highlighted
Specialist III
Specialist III

but every time when i reload script it will again reload all data from source

Highlighted
Creator
Creator

Maybe you need to make sure the Save Before Reload is turned on.  Otherwise whenever you run your code and it fails, you will be reloading your original code with no changes.  Just a thought....