question

SteveCardella-9597 avatar image
0 Votes"
SteveCardella-9597 asked PRADEEPCHEEKATLA-MSFT commented

Az CLI Synapse Pipeline create - parameterized wait task throws error

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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

PRADEEPCHEEKATLA-MSFT avatar image
0 Votes"
PRADEEPCHEEKATLA-MSFT answered SteveCardella-9597 converted comment to answer

Hello @SteveCardella-9597,

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.


image.png (227.4 KiB)
image.png (132.7 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

SteveCardella-9597 avatar image
1 Vote"
SteveCardella-9597 answered PRADEEPCHEEKATLA-MSFT commented

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.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @SteveCardella-9597,

Glad to know that your issue has resolved, now you can accept it as an answer. And thanks for sharing the solution, which might be beneficial to other community members reading this thread.

0 Votes 0 ·

Hello @SteveCardella-9597,

Did you get a chance to click on accept answer?

0 Votes 0 ·