Azure-Player / azure.synapse.tools

PowerShell module to deploy Synapse workspace (and more) in Microsoft Azure.
MIT License
20 stars 8 forks source link

Pipelines with a single activity fail when deployed with stage config #21

Closed simonp92 closed 1 year ago

simonp92 commented 1 year ago

When running the Publish-SynapseFromJson with a csv environment configuration pipelines that contain only a single activity fail.

The resulting "~pipeline.json" file is missing the array [] syntax in the output file. I suppose this is due to Powershell unboxing arrays.

Example:

pipeline.json { "name": "SetVariable", "properties": { "activities": [ { "name": "SetVar", "type": "SetVariable", "dependsOn": [], "userProperties": [], "typeProperties": { "variableName": "MyDummyVar", "value": "MyDummyVal" } } ], "variables": { "MyDummyVar": { "type": "String" } }, "annotations": [] } }

environment.csv type,name,path,value pipeline,pipeline,activities[0].typeProperties.value,"MyProductionValue"

~pipeline.json { "name": "SetVariable", "properties": { "activities": { "name": "SetVar", "type": "SetVariable", "dependsOn": [], "userProperties": [], "typeProperties": { "variableName": "MyDummyVar", "value": "MyProductionValue" } }, "variables": { "MyDummyVar": { "type": "String" } }, "annotations": [] } }

simonp92 commented 1 year ago

I can see that this is a duplicate of https://github.com/SQLPlayer/azure.synapse.tools/issues/15