Azure / Azure/Azure-DataFactory

Default Array Parameter is not processed

Open
#274 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
PowerShell
Stars
529
Forks
623
PR merge metrics
No merged PRs in 30d

Description

Hi there,
I have 2 pipelines, one defines an default parameters as array:

**pipeline fragment**
```json
{
"name": "fragment",
...
parameters: {
tables: {
type: "array",
defaultValue: [
{
schema: "one",
table: "A"
},
{
schema: "two",
table: "B"
}
]
}
```

**main pipeline**
```
{
"name": "main",
"properties": {
"description": "Default Arrays params are not passed as arrays but as strings!",
"activities": [
{
"name": "Run Nested",
"type": "ExecutePipeline",
"dependsOn": [],
"userProperties": [],
"typeProperties": {
"pipeline": {
"referenceName": "fragment",
"type": "PipelineReference"
},
"waitOnCompletion": true
}
}
],
"folder": {
"name": "xxx"
},
"annotations": []
}
}

```
when the fragment is run on its own, it works fine, however when I run the parent main pipeline, it fails, because the default params are passed as string, look at the input that I obtained from the run log:

```json
{
"pipeline": {
"referenceName": "fragment",
"type": "PipelineReference"
},
"waitOnCompletion": true,
"parameters": {
"tables": "[{\"schema\":\"one\",\"table\":\"A\"},{\"schema\":\"two\",\"table\":\"B\"}]"
}
}
```

I would expect that the parameters are empty, since I have not provided any value, more over I would expect if there are any values passed they are passed as array and not as String!

Could you please suggest how to overcome this issues?

Thank you!

Best regards,
Andrej

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.