Tranform maps questions

venkatiyer1
Giga Guru

Hi,

I am trying to import data into my user table. I have the following questions:

1. How do i skip a field getting copied from source to target if source is empty. (not a row but field) - Can i do something at onbefore script or field map script

2. Also, say i want to skip a particular field only and update the rest what would be the best way to achieve it.

3. Although a field is coalesced, we are seeing multiple entries being created in the target table. Is not supposed to just update instead of creating new rows in the table.

Need help for above questions pls.

Thanks

Message was edited by: Venkat R

1 ACCEPTED SOLUTION

swilson
Tera Expert

Hi, Venkat.



1. How do i skip a field getting copied from source to target if source is empty. (not a row but field) - Can i do something at onbefore script or field map script



By default a transform map won't update target fields if the source field is empty. There's a checkbox on the transform map form called 'Copy empty fields' which is off by default. If you check it then target fields would be updated with a blank value. I



2. Also, say i want to skip a particular field only and update the rest what would be the best way to achieve it.



I'm not sure I quite understand what you are after here. If you want to skip a field just don't include it in the field map or transform scripts. If you want to conditionally skip a field then, as Berny mentioned, you can use a transform script to conditionally set target fields based on the source field value. You don't put the source/target fields in the field map list but instead use a Before transform script (or the script on the main transform map form) to set the target field



3. Although a field is coalesced, we are seeing multiple entries being created in the target table. Is not supposed to just update instead of creating new rows in the table.



If the ID field is truly the only field with Coalesce checked then something else is causing the duplicates. In your instance I know you have tenant separation so there could be tenant-separation query business rules that are preventing the transform process from finding the record with the matching ID.



Thanks.


- Steve


View solution in original post

5 REPLIES 5

swilson
Tera Expert

Hi, Venkat.



1. How do i skip a field getting copied from source to target if source is empty. (not a row but field) - Can i do something at onbefore script or field map script



By default a transform map won't update target fields if the source field is empty. There's a checkbox on the transform map form called 'Copy empty fields' which is off by default. If you check it then target fields would be updated with a blank value. I



2. Also, say i want to skip a particular field only and update the rest what would be the best way to achieve it.



I'm not sure I quite understand what you are after here. If you want to skip a field just don't include it in the field map or transform scripts. If you want to conditionally skip a field then, as Berny mentioned, you can use a transform script to conditionally set target fields based on the source field value. You don't put the source/target fields in the field map list but instead use a Before transform script (or the script on the main transform map form) to set the target field



3. Although a field is coalesced, we are seeing multiple entries being created in the target table. Is not supposed to just update instead of creating new rows in the table.



If the ID field is truly the only field with Coalesce checked then something else is causing the duplicates. In your instance I know you have tenant separation so there could be tenant-separation query business rules that are preventing the transform process from finding the record with the matching ID.



Thanks.


- Steve