Az CLI Synapse Pipeline create - parameterized wait task throws error

Steve Cardella 11 Reputation points
2021-05-05T19:59:44.987+00:00

I was developing a shell script to deploy some pipelines to Synapse (amongst other things). One of the pipelines failed to deploy with the following error:

msrest.exceptions.DeserializationError: Unable to deserialize response data. Data: {'value': '@pipeline().parameters.WaitTimeSeconds', 'type': 'Expression'}, int, TypeError: int() argument must be a string, a bytes-like object or a number, not 'dict'

The pipeline had an expression on the wait time for a Wait task. This pipeline was previously working in Azure Data Factory. So, I created a pipeline in Synapse with just a parameter and a wait with a expression for the duration of the wait time. I saved off the JSON and tried to push it to Synapse using the az CLI. It threw the same error message. Here's the command, for what it's worth:

az synapse pipeline create --workspace-name somesynapseworkspace --file @./pl_waittest.json --name pl_waittest

Here's the full contents of pl_waittest.json:

{
    "name": "pl_waittest",
    "properties": {
        "activities": [
            {
                "name": "Wait1",
                "type": "Wait",
                "dependsOn": [],
                "userProperties": [],
                "typeProperties": {
                    "waitTimeInSeconds": {
                        "value": "@pipeline().parameters.WaitTimeSeconds",
                        "type": "Expression"
                    }
                }
            }
        ],
        "parameters": {
            "WaitTimeSeconds": {
                "type": "int",
                "defaultValue": 60
            }
        },
        "annotations": []
    }
}

It looks like the definition it checks against forgot to allow wait times to use expressions.

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,697 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Steve Cardella 11 Reputation points
    2021-05-06T12:29:48.847+00:00

    I was running 2.22.1 on Ubuntu 20.04. I found that there was a newer version 2.23.0 and that seems to have resolved the issue.

    I had thought that I had the latest, but apparently either a new version was released in the past day or two, or the packages were not the latest.

    1 person found this answer helpful.

  2. PRADEEPCHEEKATLA-MSFT 85,586 Reputation points Microsoft Employee
    2021-05-06T09:49:34.483+00:00

    Hello @Steve Cardella ,

    Thanks for the question and using Microsoft Q&A platform.

    I tried to Azure synapse pipeline using the full contents of pl_waittest.json as shown above:

    94324-image.png

    Successfully able to create the pipeline using az synapse pipeline create command.

    94387-image.png

    Hope this helps. Do let us know if you any further queries.

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

    Please don’t forget to Accept Answer and Up-Vote wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments