pass parameters to SQL query in Azure data factory pass parameters to SQL query in Azure data factory azure azure

pass parameters to SQL query in Azure data factory


Which version of Azure DataFactory are you using, v1 ir v2?

If v2 is an option for you, you could achieve this by using Lookup activity that queries the database to get your dynamic properties and then referencing that activity's output in your sql query like so:

select * from from xyz_tbl where date between @{activity('LookupActivity').output.date1} and @{activity('LookupActivity').output.date2}

Here's a more detailed msdn tutorial for the Lookup activity: https://docs.microsoft.com/en-us/azure/data-factory/control-flow-lookup-activity