Azure Data Factory v2: Activity execute pipeline output

大城市里の小女人 提交于 2020-08-06 12:49:25

问题


Is there a way to reference the output of an executed pipeline in the activity "Execute pipeline"?

I.e.: master pipeline executes 2 pipelines in sequence. The first pipeline generates an own created run_id that needs to be forwarded as a parameter to the second pipeline.

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. Currently we have 1 pipeline that calls the next pipeline and forwards the run_id.


回答1:


ExecutePipline currently cannot pass anything from its insides to its output. You can only get the runID or name.

For some weird reason, the output of ExecutePipeline is returned not as a JSON object but as a string. So if you try to select a property of output like this @activity('ExecutePipelineActivityName').output.something then you get this error:

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




回答2:


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

If you want to use the runId of the pipeline executed previosly, it would look like this:

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

Hope this helped!



来源:https://stackoverflow.com/questions/53412439/azure-data-factory-v2-activity-execute-pipeline-output

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!