Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Halo Qlik Community
I want to make automatic update script, which runs every night. My system keeps data only from last 31 days, so it is rolling 31 days of data.
Example:
I have archive table TA with ID column (values: 1-1000) from 1-1-2017
and i have update table TU with ID column (values: 10-1009) from 2-1-2017
What I need is data range 1-1009 and more every night.
I'm quite new in Qlik sense, I heard something about left join or where not exist, but I'm not sure how to use it in that case.
Greetings.
Hi Przemyslaw,
May be it help you:
Data:
Load
..
..
Datefield-today() as [Date Diff]
From
<path>
Noconcatenate
FinalData:
Load * resident Data where [Date Diff] <= 31;
Drop Table Data;
Thanks,
Arvind Patil
Hi
Thank you for reply!
31 rolling days in data base is the reason why I have to build archive data. So this expression is not necessary.
I would like to add every night data from previous day to archive table.
The idea is to append data from update to archive without same row data:
Greetings
Przemyslaw Rybacki
So I think I have it.
TA:
LOAD
ID,
UNITS
FROM....;
Concatenate
TD:
ID,
UNITS
FROM....;
WHERE NOT EXISTS (ID)
;
Is it so simple? Results looks fine... Any remarks???