2
votes

I have two tables identical tables with data from different sources. These tables must now be merged. Both these tables do not have any primary keys

I need to merge on table 2 T2 with data in table 1 T1

Update T2 when data matches on following columns in T1

T2.f_id = T1.f_id and T2.r_id = T1.r_id and T2.date = T1.date

else Insert data from T1 into T2

There are 50+ more columns of numeric data type with values 1's and 0's and '[NULL]'

When I tried merging the data, Updates went fine.

But for the inserted rows, all the T2.f_id, T2.r_id and T2.date column values were [NULL] but the values in other columns got inserted fine

Can someone help where I am going wrong

I am using Informatica. Using lookup on T2(target) and Update startegy to update or insert

1
You can just debug the mapping, and see what is happening. Maybe some ports are not connected or something. It is hard to speculate without seeing the mapping! - Samik

1 Answers

0
votes

You are pulling the wrong ports from the lookup transformation. Make sure your ports from the source T1 is set to input/output in the lookup and this is the one connected to the insert flow of the mapping.