Importing records using Transform maps but Ignore Duplicate Records that are created in Target Table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2022 09:07 AM
Hi,
We have a Transform Map which has mapping to Incident table. Data is coming via an Integration and mapped to Incident table. We also have coalesce for external ticket field so that it does not create a duplicate.
And our requirement is that we have several other fields as well for which we need to check if the same data exist in Incident table it should not insert a new record.
For eg:
Description(incident) is mapped to Description(source) field.
Company (incident) is coming from user i.e created from on before transform script.
Caller(incident) is coming from On before transform Script.
Now if we have combination of 'Description', 'caller' and 'Company' already existing in SNOW it should not insert New record in Target table.
Can anyone please help us in this requirement?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2022 12:07 PM
Hello
You have 2 options to achieve this requirement
1) Mark the coalesce field 'true' for all the 3 fields "Description", 'Caller' , 'company' . So that system will check if the combination of these 3 fields is already existing then it will not Insert the new record and ignore the record.
2) Create Transform script and write a script to check if the combination of these 3 fields is already existing then mark it as 'ignore=true'.
Please Mark ✅ Correct/helpful, if applicable, Thanks!!
Regards
Sulabh Garg
Regards
Sulabh Garg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2022 12:24 PM
Hi Sulabh,
For the first Response :
1) Mark the coalesce field 'true' for all the 3 fields "Description", 'Caller' , 'company' . So that system will check if the combination of these 3 fields is already existing then it will not Insert the new record and ignore the record.
My Analysis: Here we already have coalesce on one field. Even after that duplicates are created. That means this field is getting different inputs on the coalesce field. So now if I put coalesce on other three fields as well it will still create new record as system will check combination of all four fields now.
For the Second Response:
2) Create Transform script and write a script to check if the combination of these 3 fields is already existing then mark it as 'ignore=true'.
My Question : Which script shall we write here 'Run Script' or 'on Before Script' ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2022 12:35 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-13-2022 12:05 AM
Regards
Sulabh Garg