Skip to main content
Announcements
Jan 15, Trends 2025! Get expert guidance to thrive post-AI with After AI: REGISTER NOW
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.

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
Luminary Alumni
Luminary Alumni

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.