How to run SQL Script in Azure Data Factory v2?

alvipeo picture alvipeo · Jul 2, 2018 · Viewed 12.3k times · Source

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?

Answer

SouravA picture SouravA · Dec 20, 2019

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:

enter image description here

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.