Closed simonp92 closed 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": [] } }
{ "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"
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": [] } }
{ "name": "SetVariable", "properties": { "activities": { "name": "SetVar", "type": "SetVariable", "dependsOn": [], "userProperties": [], "typeProperties": { "variableName": "MyDummyVar", "value": "MyProductionValue" } }, "variables": { "MyDummyVar": { "type": "String" } }, "annotations": [] } }
I can see that this is a duplicate of https://github.com/SQLPlayer/azure.synapse.tools/issues/15
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": [] } }