Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How make right code increamental load?

Can someone help me to repair my increamental load code? I used Oracle as a database. This is my code.

RA_CUSTOMER_TRX_ALL_TMP:

LOAD LAST_UPDATE_DATE

FROM

RA_CUSTOMER_TRX_ALL.qvd

(qvd);

Min_Max_RA_CUSTOMER_TRX_ALL:

LOAD Max(LAST_UPDATE_DATE) AS Max_TGL

Resident RA_CUSTOMER_TRX_ALL_TMP;

Let TglMax = Date(Peek('Max_TGL', 0, 'Min_Max_RA_CUSTOMER_TRX_ALL'));

DROP Table Min_Max_RA_CUSTOMER_TRX_ALL, RA_CUSTOMER_TRX_ALL_TMP;

RA_CUSTOMER_TRX_ALL:

SQL SELECT *

FROM AR."RA_CUSTOMER_TRX_ALL"

WHERE LAST_UPDATE_DATE >= '$(TglMax)';

Concatenate

LOAD *

FROM

RA_CUSTOMER_TRX_ALL.qvd

(qvd)

where not Exists(CUSTOMER_TRX_ID);

Store RA_CUSTOMER_TRX_ALL into RA_CUSTOMER_TRX_ALL.qvd;

DROP Table RA_CUSTOMER_TRX_ALL;

Why does my code always fail when reload process reach step RA_CUSTOMER_TRX_ALL? May be trouble in format TglMax or LAST_UPDATE_DATE.

Thanks,

Danny H.

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

I have make a variable format date like this

Let formatDate= 'YYYYMMDD'

so i must change

Let TglMax = Timestamp(Peek('Max_TGL', 0, 'Min_Max_RA_CUSTOMER_TRX_ALL'), formatDate);

I think date converter very important in increamental load.

View solution in original post

2 Replies
jagan
Partner - Champion III
Partner - Champion III

Hi,

Check whether you are getting the value in TglMax variable.

Regards,
Jagan.

Not applicable
Author

I have make a variable format date like this

Let formatDate= 'YYYYMMDD'

so i must change

Let TglMax = Timestamp(Peek('Max_TGL', 0, 'Min_Max_RA_CUSTOMER_TRX_ALL'), formatDate);

I think date converter very important in increamental load.