Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
My requirement is to load data from excel to oracle table with below conditions
Table columns are
cust_no,Name,Item,Orders,Location,Flag
cust_001, John, Watch,3, Mumbai, I-------------------->flag should change
1.If record already exists in table then FLAG column should change from "I" to "U"
Expected output:
cust_no,Name,Item,Orders,Location,Flag
cust_001, John, Watch,3, Mumbai, U---------------------->Already existing record on table
cust_002, Mathew, Bag, 3, Bangalore, I
cust_001, John, Watch,3, Mumbai, I-------------------->record from excel should insert like this
My job design looks like below screenshot
The problem is new records from excel inserting with flag "I" but existing record flag is not Insert as the new record it just update the existing record Flag
1.InsertRec--->output-->action on table --->Insert
2.Update -->output-->action on table -->Tried with Insert or update ,update or insert,update but it's not inserting as new record
When I tried with Insert as action on table it is inserting the record which is already in table is as below
cust_no,Name,Item,Orders,Location,Flag
cust_001, John, Watch,3, Mumbai, U
when I work with start_date,end_date using SCD component it's giving me exactly what I'm looking for.
Hope you understand the problem.
As soon as possible please help me to resolve this!
Thanks in advance
Hi Shong,
I am implementating SCD type2 without using SCD component in talend but i am not getting Startdate and End as par my requirement.
Requirement is:
1.If data is fresh then start date will set as current date and end date as null.
2.if data is already exist in DB but one attribute changed that data then what it should do for previous record end date should be as current date and for new updated record start date as current date and end date will be null.