I am trying to execute a stored procedure in an Azure SQL database from an Azure DataFactory V2. The procedure will do some upsert into different tables with data from a fla
I'm not sure if I understand the problem correctly, you just want to call a stored procedure from a copy activity?
Doing that is pretty easy, in a copy activity you can define the sqlReaderQuery property inside source. This property lets you enter a t-sql command, so you can do something like this:
"typeProperties": {
"source": {
"type": "SqlSource",
"sqlReaderQuery": "EXEC sp_Name; select 1 as test"
},
. . .
Copy activity always expects a result from the query, so if you only include the call to the stored procedure it doesnt thats why I include the second part of the query.
Replace with the parameters you want to use and thats it.