2
votes

How do I parameterize the where condition in a lookup activity query in azure data factory? I have created a pipeline parameter and tried to pass it to the lookup activity query as given below.

select max(dt) as dt from tab1 where col='@pipeline.parameters.parama1'

I have tried with quotes, without quotes, curly brackets, but still not firing. Any help would be appreciated.

Regards, Sandeep

1

1 Answers

2
votes

Official doc here: https://docs.microsoft.com/en-us/azure/data-factory/control-flow-expression-language-functions

Expressions can also appear inside strings, using a feature called string interpolation where expressions are wrapped in @{ ... }.

Taking this into consideration, this may work for you:

select max(dt) as dt from tab1 where col=@{pipeline().parameters.param}

Hope this helped!