Reputation: 2616
Just wondering how can we set a Default value in Data Factory Copy Activity in mappings.
Trying to do following
Azure Data Factory Source Dataset value from Parameter
But if that's not possible, can I set a default value through parameter while defining mappings?
Upvotes: 0
Views: 3124
Reputation: 327
To achieve your requirement, you could define a pipeline parameter with "Object" type and give it a default value, eg. name it as "columnMapping" and set the default value as:
{
"type": "Object",
"defaultValue": {
"type": "TabularTranslator",
"columnMappings": {
"Prop_0": "Prop_0",
"Prop_1": "Prop_1",
"Prop_2": "Prop_2"
}
}
}
then assign the parameter to the copy activity column mapping:
"translator": {
"value": "@pipeline().parameters.columnMappings",
"type": "Expression"
}
Upvotes: 1