I’m a new user to Snaplogic, so go easy. My question is on using the “SQL Server – Merge” snap:
I’ve created a pipeline to import from a sftp csv-formatted source to merge (update or insert) into a table on an SQL server database.
It’s partially working! When I run the pipeline it successfully goes through the sftp->CSV parser->Mapper->SQL Server – Merge snaps to insert the csv-mapped records into the MS-SQL target db table with no problem.
But when running a second time I get a “Violation of PRIMARY KEY constrain” error, so new records can be inserted, but not updated.
My questions are:
- When looking at the Merge snap settings I see no place to put the WHEN MATCHED or WHEN NOT MATCHED BY logic?
How is the Identity Column setting used? I though it might be a setting for the primary unique key, but that does not seem to be the case.
With other pipelines I was able to setup a route-error-data view to capture errors into a file. When I attempt that with the SQL Server Merge snap I get an ‘Error branch will overlap with existing Snaps” error. I’ve attempted to rearrange the pipeline snaps but to no avail, I still cannot setup the error route view.
I’ve also reviewed and read the snap documentation at:
I see that there’s a “ELT Merge Into” snap, but I do not have access to that snap from the designer tool.
Should I be using that snap instead?
Thanks for any insights or guidance!