Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I'm creating SCD type 2 after getting data from SRC table and LKP table to tmap i'm creating a variable to show me what is the new record and what is the update record
new record condition : IF(ISNULL(SURRID)),True,False
update record condition : IF(NOT ISNULL(SURRID) AND SRC.EmailAddress Not Equal LKP.EmailAddress),True,False
as shown below
Hi Fawad,
Though i didnt find any documentation on Talend, which confirms this, my experience taught me use ".equal" vs "=" when you try to compare string values. See using row2.SURRID.equals(null) makes any difference.
Hi Tnewbie,
Hi Fawaad,
From your job design, looks like you are joining on CustomerID where SURRID seems to be a key column in your lookup table, so at any point of time you will never get your SURRID as null if you have a match, did you try checking the existence of CustomerID vs SURRID, additionally CustomerID is an int column so your query performance will also be elevated with int comparison vs string comparison.
Also, Is there a reason why you have to manually do the SCD2 determination, instead of using Talend built components? I am extensively using SCD components tDBSCD (SCD Type 2) and i don't have any issues so far. Did you try using SCD components?
Hi Tnewbie,
Please imagine that we are inserting a new record from the source then when the lookup done the record will not be exist in the lookup table and here the SURRID = null.
I didn't use the component because as the when a record updated I need the end date of the old record to be the start date of the new record minus 1 day not the
Fawaad,
I am not sure if i am understanding the problem correctly...anyway, 1 last things i would try suggesting from my end before i give up 🙂 You can probably try the tmap setting, where you can capture non matching records...pls check the attachment