简体   繁体   English

Azure 数据工厂 v2:活动执行管道输出

[英]Azure Data Factory v2: Activity execute pipeline output

Is there a way to reference the output of an executed pipeline in the activity "Execute pipeline"?有没有办法在“执行管道”活动中引用已执行管道的输出?

Ie: master pipeline executes 2 pipelines in sequence.即:主管道依次执行 2 个管道。 The first pipeline generates an own created run_id that needs to be forwarded as a parameter to the second pipeline.第一个管道生成一个自己创建的run_id,需要作为参数转发给第二个管道。

I've read the documentation and checked that the master pipeline log the output of the first pipeline, but it looks like that this is not directly possible?我已经阅读了文档并检查了主管道是否记录了第一个管道的输出,但看起来这不是直接可能的?

We've used until now only 2 pipelines without a master pipeline, but we want to re-use the logic more.到目前为止,我们只使用了 2 个没有主管道的管道,但我们希望更多地重用逻辑。 Currently we have 1 pipeline that calls the next pipeline and forwards the run_id.目前我们有 1 个管道调用下一个管道并转发 run_id。

ExecutePipline currently cannot pass anything from its insides to its output. ExecutePipline 当前无法将任何内容从其内部传递到其输出。 You can only get the runID or name.您只能获取 runID 或名称。

For some weird reason, the output of ExecutePipeline is returned not as a JSON object but as a string.出于某种奇怪的原因,ExecutePipeline 的输出不是作为 JSON 对象而是作为字符串返回的。 So if you try to select a property of output like this @activity('ExecutePipelineActivityName').output.something then you get this error:因此,如果您尝试选择这样的输出属性@activity('ExecutePipelineActivityName').output.something那么您会收到此错误:

Property selection is not supported on values of type 'String' “字符串”类型的值不支持属性选择

I found that I had to use the following to get the run ID: @json(activity('ExecutePipelineActivityName').output).pipelineRunId我发现我必须使用以下内容来获取运行 ID: @json(activity('ExecutePipelineActivityName').output).pipelineRunId

The execute pipeline activity is just another activity with outputs that can be captured by other activities.执行管道活动只是另一个活动,其输出可以被其他活动捕获。 https://docs.microsoft.com/en-us/azure/data-factory/control-flow-execute-pipeline-activity#type-properties https://docs.microsoft.com/en-us/azure/data-factory/control-flow-execute-pipeline-activity#type-properties

If you want to use the runId of the pipeline executed previosly, it would look like this:如果你想使用之前执行的管道的 runId,它看起来像这样:

@activity('ExecutePipelineActivityName').output.pipeline.runId

Hope this helped!希望这有帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM