Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run SQL Script in Azure Data Factory v2?

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?

like image 958
alvipeo Avatar asked Jul 01 '18 22:07

alvipeo


People also ask

What is script activity in Azure data Factory?

Using the script activity, you can execute common operations with Data Manipulation Language (DML), and Data Definition Language (DDL). DML statements like INSERT, UPDATE, DELETE and SELECT let users insert, modify, delete and retrieve data in the database.


1 Answers

I agree that the absence of something like "Execute SQL task" of 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 liner 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.

like image 101
SouravA Avatar answered Sep 23 '22 09:09

SouravA