Data Factory Copy Activity - SYNC - Stored Proc - Has anyone used generic parameter to use same proc on multiple tables?

Blasko, Dan W 20 Reputation points
2025-01-03T16:33:55.7+00:00

I am trying to use the copy activity and in the sync side, use the stored procedure option.

It requires two parameters. One of them is a custom data type for the table.

Has anyone figured out a way to use a generic parameter so that this same copy could be used on multiple tables?

I would like one pipeline and not one for each table.

I can build my merge statement inside the stored proc and then call that statement within that proc. I just don't know how to pass a generic table type.

I'm guessing this isn't possible, but hoping someone has a work around.

Trying to avoid loading a staging table because some of the tables are very large data sets and loading everything twice is not an option.

My other thought was using the upsert. But what if someone deletes a source row? How do we remove that from the destination table? Seems like a merge statement would be perfect.

I can get it to work using a stored proc with the type hardcoded in it. Just hoping to make it generic so it can be reused.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,072 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.