I'm pretty sure this is simple, but I can't seem to find this anywhere. I created a parameter in a parent pipeline (say the pipeline name is TestParent) in data factory:
This parent pipeline invokes a child pipeline. I want to reference this parameter in the child pipeline. What is the syntax to get the value of this parameter from the parent in the child?
OK I finally got this to work:
I completely removed the parameter from the parent pipeline. In the child pipeline (which is called HubMaster) we create a parameter called MasterBatchId:
In the parent pipeline I created an Execute pipeline node called EP_HubMaster that calls a child pipeline called HubMaster. In order to populate the child pipeline parameter MasterBatchId at run time, we need to edit the JSON of the parent pipeline to look like this:
{
"name": "TestParent",
"properties": {
"activities": [
{
"name": "EP_HubMaster",
"type": "ExecutePipeline",
"typeProperties": {
"pipeline": {
"referenceName": "HubMaster",
"type": "PipelineReference"
},
"parameters": {
"MasterBatchId": {
"value": "@pipeline().RunId",
"type": "Expression"
}
}
}
}
],
"folder": {
"name": "Master"
}
},
"type": "Microsoft.DataFactory/factories/pipelines"
}
You can see that we pass the @pipeline().RunId
from the parent (which was the original intent) to the input parameter of MasterBatchId
in the child pipeline.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.