function app not reading / getting body in azure data factory?

javier 936 Reputation points
2020-10-27T19:00:40.643+00:00

I have a simple azure data factory pipeline consisting on a function app that takes two pipeline variables and a fixed string as a third input as part of the body.

The function runs without problems in local dev. But when triggered in ADF it throws an exception indicating that the three params are None (no params received). Seems like it is not reading the body at all.

The body as set in ADF:

{"campaign_cycle": @variables('var_campaign'), "account_id" : @variables('var_account'), "status_msg" : "STATUS_OK"}

Also tried passing the variables values as variables('var_campaign') with no success

Any idea of what may be going on here?

Example run id : c8e5a78a-e4ee-415e-bd61-1ee22389c55e

regards

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,605 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,072 questions
0 comments No comments
{count} votes

Accepted answer
  1. HarithaMaddi-MSFT 10,136 Reputation points
    2020-10-28T09:07:16.85+00:00

    Hi @javier ,

    Welcome to Microsoft Q&A Platform. Thanks for posting the query.

    The issue is because it is not able to read the variable value and to consider evaluating the entire expression as a string, Please try passing the variables expression in double quotes as shown below or if its a string value you can use casting to string. I tested and it worked for me.

    {"name":"@variables('test')"}  
    

    Please let us know if the issue persists and we will be glad to assist further.

    ----------------------------------------------------------------------

    • Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification.
    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful