Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

przemyslaw_r
New Contributor

Updating row data in table.

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.

3 Replies
arvind_patil
Valued Contributor II

Re: Updating row data in table.

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

przemyslaw_r
New Contributor

Re: Updating row data in table.

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:Capture.PNG

Greetings

Przemyslaw Rybacki

przemyslaw_r
New Contributor

Re: Updating row data in table.

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

Community Browser