Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello world,
I have a problem about a very distinct situation :
I Have 2 tables, let's call them Addresses and Clients;
I want to copy the rows in Addresses concerning Client A to Client B and according to the situation, insert or update any new info. Classic, right.
Normally, I would use Addresses as a target and source of information, join Addresses on Clients, and try to match with the target Addresses table.
How I would do that would be to tick every interesting column in target table as Primary Key and let the mapping execution take its course.
This has bin so far so good but in that particular case, any checking is ineffective and all the rows matched by the source are copied to the target table.
If I execute the mapping twice, I will have twice as many addresses created, which is illogical.
The target table options are 'Update OR Insert', but I also tried with 'Insert if not exist' with the same outcome.
Maybe I use Primary Keys poorly, or is there anything I am missing?
BTW I use 5.2.2 Talend Open Studio for Data Integration.
Any Ideas?
client A
-An address is created
-The minimum information required (asside from mail information and the likes) is an account ID (ext. key) and an address type
-I insert the string in the technical field as such : <Type of address> '_' <Account ID>
Client B
-Client A and B are matched
-The technical field and account ID are matched so that the copy happens ONCE from lv1 to lv2