0

I'm using postman to make rest requests to the azure API to run a pipeline that is in synapse, in terms of permissions and the token I already get them and it works, the problem is that the pipeline receives 3 parameters but I don't know how to pass them, so I have this request, example:

https://hvdhgsad.dev.azuresynapse.net/pipelines/pipeName/createRun?api-version=2020-12-01

and the parameters I added them in the body:

{
    "parameters": {
        "p_dir": {
            "type": "string",
            "defaultValue": "val1"
        },
        "container": {
            "type": "string",
            "defaultValue": "val"
        },
        "p_folder": {
            "type": "string",
            "defaultValue": "val3"
        }
    }
}

but when I validate the run that was launched with the request I get this.

{
    "id": "xxxxxxxxxxxxxxx",
    "runId": "xxxxxxxxxxxxxxxxxxxxx",
    "debugRunId": null,
    "runGroupId": "xxxxxxxxxxxxxxxxxxxx",
    "pipelineName": "xxxxxxxxxxxxxxxxx",
    "parameters": {
        "p_dir": "",
        "p_folder": "",
        "container": ""
    },
    "invokedBy": {
        "id": "xxxxxxxxxxxxxxxxx",
        "name": "Manual",
        "invokedByType": "Manual"
    },
    "runStart": "2021-07-20T05:56:04.2468861Z",
    "runEnd": "2021-07-20T05:59:10.1734654Z",
    "durationInMs": 185926,
    "status": "Failed",
    "message": "Operation on target Data flow1 failed: {\"StatusCode\":\"DF-Executor-SourceInvalidPayload\",\"Message\":\"Job failed due to reason: Data preview, debug, and pipeline data flow execution failed because container does not exist\",\"Details\":\"\"}",
    "lastUpdated": "2021-07-20T05:59:10.1734654Z",
    "annotations": [],
    "runDimension": {},
    "isLatest": true
}

the params are empty, so I don't know what's wrong or missing. what is the correct way to pass them???

ref: https://learn.microsoft.com/en-us/rest/api/synapse/data-plane/pipeline/create-pipeline-run#examples

2 Answers 2

1

Just created an account to answer this as i've had the same issue.

I resolved this by just having the name of the variable and its subsequent value in the body JSON.

e.g.

{"variable": "value", "variable": "value"} 

Found this by following the documentation you had posted, under request body it passes the name of the variable and the value directly into the JSON body.

{
  "OutputBlobNameList": [
    "exampleoutput.csv"
  ]
}

This particular example is a list/array so it confused me by adding the brackets [] if you are passing string parameters this is unneeded.

Sign up to request clarification or add additional context in comments.

Comments

0

One additional comment, where I was strugeling. In order to use a Parameter via the REST API it has to be a dynamic Base Parameter in the Pipeline definition: @pipeline().parameters.note enter image description here

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.