Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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
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
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
but every time when i reload script it will again reload all data from source
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....