When building complex Pipelines in the cloud with Azure Data Factory and Azure Synapse Pipelines, a very common pattern is to separate different workflow branches into child pipelines.
Now we can customize the output of our pipeline and consume that return value from the calling pipeline.
In the below example of a parent pipeline, I have an execute pipeline activity that is calling a child pipeline. The executed pipeline will return a custom value after it has been executed. I am then consuming that return value in the subsequent activity in my parent pipeline. The 2nd activity below is a Script activity that I am using for logging, and I use the expression below to grab the return value from the previous activity.
In the below example, The pipeline expression builder provides quick access to the return value (preview) that I set in the child pipeline using Set Variable. Notice that I called my return value variable “Child_PL_Value” so that I can then access it from the parent pipeline after the previous activity expression like
@activity('Child Pipeline').output.pipelineReturnValue.Child_PL_Value