Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

agni_gold
Valued Contributor II

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
manideep78
Valued Contributor

Re: Implement Incremental Load

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

Not applicable

Re: Implement Incremental Load

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

agni_gold
Valued Contributor II

Re: Implement Incremental Load

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

thnkgreen
Contributor

Re: Implement Incremental Load

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....

Community Browser