我很确定这很简单,但我似乎无法在任何地方找到它。我在数据工厂中的父管道中创建了一个参数(比如管道名称是TestParent):
好的,我终于让它工作了:
我完全从父管道中删除了参数。在子管道(称为HubMaster)中,我们创建一个名为MasterBatchId的参数:
在父管道中,我创建了一个名为EP_HubMaster的Execute pipeline节点,该节点调用名为HubMaster的子管道。为了在运行时填充子管道参数MasterBatchId,我们需要编辑父管道的JSON,如下所示:
{
"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"
}
您可以看到我们将@pipeline().RunId
从父级(这是原始意图)传递到子管道中MasterBatchId
的输入参数。