Fluxy
Fluxy

Reputation: 2978

How to pass parameters from Data Factory to Azure Function?

I try to pass 2 parameters from Data Factory to Azure Functions. Everything works well if I hardcode the parameter values in Body as follows:

{"param1":"value1","param2":"value2"}

However, if I try to use @pipeline().parameters.param1 and @pipeline().parameters.param2, then it fails because the values are None. The pipeline parameters param1 and param2 are defined correctly and they are passed correctly to, e.g., Databricks.

{"param1":@pipeline().parameters.param1,"param2":@pipeline().parameters.param2}

As the header I pass: Content-Type equal to application/json.

What is wrong in my expression?

Upvotes: 1

Views: 1574

Answers (1)

GregGalloway
GregGalloway

Reputation: 11625

Please try this expression:


@concat('{"param1":"', pipeline().parameters.param1, '", "param2":"', pipeline().parameters.param2,'"}')

Upvotes: 1

Related Questions