Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
alejortizp
Contributor III
Contributor III

Incremental load for date

Hi good day,


I am trying to create an incremental load of my records, and from my historical data use the last modification date to upload only those new or updated files that have been modified in the file with the new and updated records. In the excel file sheet 1 brings the historical and in sheet 2 the new and modified files, but in sheet 2 I included a file with a date after the historical one to verify that it will not be updated and the most current record will remain .

Thank you very much if you give me a light.

T1:

LOAD

    *

FROM [lib://CARGA_INCREMENTAL/incremental.Qvd](qvd);

sub:

LOAD Date(max(FECHA_SOLICITUD)) as maxID

Resident T1;

DROP Table T1;

let vmaxID=Peek('maxID',-1,T1);

Incremental:

LOAD

    *

FROM

[lib://CARGA_INCREMENTAL/incremental.Qvd](qvd);

Concatenate

LOAD

     *

FROM

[lib://CARGA_INCREMENTAL/direfencial.Qvd](qvd)

Where FECHA_SOLICITUD>$(vmaxID);

STORE Incremental into [lib://CARGA_INCREMENTAL/Prueba4_Incremental.qvd](qvd);

Labels (1)
1 Solution

Accepted Solutions
sibusiso90
Creator III
Creator III

Hi Alejandro,

Please find the below response for your answer. The problem was both the table you are sourcing your variable from and formatting since it comes in as text.

T1:

LOAD

    *

FROM [lib://CARGA_INCREMENTAL/incremental.Qvd](qvd);

sub:

LOAD

max(DATE#(FECHA_SOLICITUD,'DD/MM/YYYY')) AS maxID

Resident T1;

DROP Table T1;

let vmaxID=Peek('maxID',-1,sub);

Incremental:

LOAD

    *

FROM

[lib://CARGA_INCREMENTAL/incremental.Qvd](qvd);

Concatenate

LOAD

     *

FROM

[lib://CARGA_INCREMENTAL/direfencial.Qvd](qvd)

Where DATE#(FECHA_SOLICITUD,'DD/MM/YYYY')>$(vmaxID);

STORE Incremental into [lib://CARGA_INCREMENTAL/Prueba4_Incremental.qvd](qvd);

View solution in original post

1 Reply
sibusiso90
Creator III
Creator III

Hi Alejandro,

Please find the below response for your answer. The problem was both the table you are sourcing your variable from and formatting since it comes in as text.

T1:

LOAD

    *

FROM [lib://CARGA_INCREMENTAL/incremental.Qvd](qvd);

sub:

LOAD

max(DATE#(FECHA_SOLICITUD,'DD/MM/YYYY')) AS maxID

Resident T1;

DROP Table T1;

let vmaxID=Peek('maxID',-1,sub);

Incremental:

LOAD

    *

FROM

[lib://CARGA_INCREMENTAL/incremental.Qvd](qvd);

Concatenate

LOAD

     *

FROM

[lib://CARGA_INCREMENTAL/direfencial.Qvd](qvd)

Where DATE#(FECHA_SOLICITUD,'DD/MM/YYYY')>$(vmaxID);

STORE Incremental into [lib://CARGA_INCREMENTAL/Prueba4_Incremental.qvd](qvd);