How to run SQL Script in Azure Data Factory v2?

a 夏天 提交于 2020-05-29 04:36:08

问题


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:


  1. There is a preCopyScript property. You could put your script there. It will be executed before each run.

  2. You could use store procedure activity as Summit mentioned.

  3. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!