将值从父管道传递到Azure数据工厂中的子管道

问题描述 投票:0回答:1

我很确定这很简单,但我似乎无法在任何地方找到它。我在数据工厂中的父管道中创建了一个参数(比如管道名称是TestParent):

enter image description here此父管道调用子管道。我想在子管道中引用此参数。从子节点中的父节点获取此参数值的语法是什么?

azure azure-data-factory
1个回答
1
投票

好的,我终于让它工作了:

我完全从父管道中删除了参数。在子管道(称为HubMaster)中,我们创建一个名为MasterBatchId的参数:

enter image description here

在父管道中,我创建了一个名为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的输入参数。

© www.soinside.com 2019 - 2024. All rights reserved.