Parmeter values not resolving in ADF

55 views Asked by At

I have a scenario where I want to dynamically pass parameters to a stored procedure. I have created a parameter called runId and assign the value as 1234, and created another parameter where I'm calling the runId parameter as:

{
    "PipelineRunId": {
        "value": "@pipeline().parameters.runId",
        "type": "String"
    }
}

But the input for the stored procedure looks like below:

{
    "storedProcedureName": "StoredprocName",
    "storedProcedureParameters": {
        "PipelineRunId": {
            "value": "@pipeline().parameters.runId",
            "type": "String"
        }
    }
}

My expectation is here to see value as "1234", not sure if I'm making any mistake here.

Any help is greatly appreciated.

1

There are 1 answers

0
Aswin On

The value for the Stored procedure parameter PipelineRunId should be of expression and it is not of string type. In order to do that in stored procedure activity, do the following.

  • Click Add dynamic content in the value text box of stored procedure parameters.

  • Enter the value @pipeline().parameters.runId in the text box.

Pipeline Json will look like below:

"storedProcedureParameters": {
  "PipelineRunId": {
     "value": {
               "value": "@pipeline().parameters.runId",
                "type": "Expression"
                    },
              "type": "String"
                  }
                }