2 coalesce field on a transform map not working properly

Evren Yamin
Tera Contributor

Hello,

I have a transform map that needs to have 2 coalesce field but it is not working. It just inserts instead of updating the record. Does having 2 coalesce work?

Appreciate all the help

15 REPLIES 15

Community Alums
Not applicable

Hi Evren,

Coalesce always work with "AND" operator for more than one field. Is this how you want to set the unique key?

BR, Gaurav 

Hello Gaurav,

Yes, I need to check for example this code + amount is already existing.

The reason is, some records have the same code but with different amount.

Record1

Code > 123456

Amount > $1000

Record2

Code > 123456

Amount > $2000

 

So if I want to update the record, I need to check both values.

So, what you are trying to say is that you want both records in the import set to update the same (single) record in the target table where code is 123456 by adding up $1000 and $2000 so that in the end there's gonna be a single record where code is 123456 and amount is $3000?

Evren Yamin
Tera Contributor

Nope, I mean if I have these records on the table 

find_real_file.png

 

Then load this data using transform map

find_real_file.png

The table will be updated to look like this

find_real_file.png