问题
There is NO Sql Script activity in Azure Data Factory V2. So how can I create a stored proc, a schema in a database? What are my options?
回答1:
There is a preCopyScript property. You could put your script there. It will be executed before each run.
You could use store procedure activity as Summit mentioned.
You could also create a custom activity.
回答2:
I agree that the absence of something like "Execute SQL task" is SSIS is bumming. I normally use a "LookUp" activity as I don't like to create procedures for simple tasks which could be a one line command. The only constraint of lookup activity is that it needs some sort of output result set. So what I do when I need to run an update statement is something like this:
The dummy query select 0 id
"feeds" the data to the Lookup activity and thus it is able to run the command set on database.
来源:https://stackoverflow.com/questions/51127506/how-to-run-sql-script-in-azure-data-factory-v2