Azure Data Factory Set Parameter with SQL Query

7.7k views Asked by At

What is the alternative to SSIS' Execute SQL Task in ADF?

I've created a Pipeline parameter called ExtractDate (i know there isn't a date datatype option so I'm using a string datatype here) that I want to populate with the result of a SQL Query and then pass this into other pipelines.

I might be searching for the wrong terms but there doesn't seem to be many tutorials on how to write a SQL query within dynamic content to populate a paramater.

Any examples would be appreciated

2

There are 2 answers

0
JeffRamos On BEST ANSWER

You can make this work using a variable if you are calling one pipeline from within another pipeline, but you can't pass values between pipelines which are peers of one another.

You cannot change a pipeline parameter from within the pipeline.

OK

No good

For the first situation which will work, here are the details... Lookup

Set Variable

Pass to Pipeline

0
Leon Yue On

Data Factory has the Stored Procedure activity can help us execute the stored procedure in Azure SQL or SQL Server. Or we also could use Lookup active to get the SQL query result.

When the Azure SQL /SQL Server as the source, Data Factory supports query operation.

But for the pipeline parameter, we only can pass the value form the pipeline parameter to pipeline active, we can't pass or set the value from the inner active result to parameter. That means It's impossible to populate with the result of a SQL Query and then pass this into other pipelines.