Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
liney_marcela
Frequent Visitor

How to pass dynamic output from a child pipeline to a parent pipeline in Fabric

Hi,

I have a child pipeline (Pipeline A) where, at the end, I use a Set Variable activity to produce a dynamic output that looks like this:
{
"name": "emails",
"value": [
"aa@xx.com",
"bbb@xx.com",
"ccc@xx.com"
]
}
I want to invoke this result in another parent pipeline (Pipeline B) using the Invoke Pipeline activity.
The issue is that the Pipeline Return Value option only lets me provide a plain text value and doesn’t allow me to dynamically pass the output generated by the child pipeline.
How can I pass this dynamic output from the child pipeline to the parent pipeline and use it as an input for other activities (for example, a ForEach loop)?Any suggestions, best practices, or working examples would be greatly appreciated!

1 ACCEPTED SOLUTION
justinjbird
Regular Visitor

Pipeline return value will allow you to do this if you set the type to expression and pass your variable value in. The key step is to convert the variable back from a string using the `@json` function, so it can be used by the for each loop.

 

It should look something like this `@json(variables('var'))` you can either do that in the set variable task that is setting the return value, or in the `items` section of the for each loop.

View solution in original post

3 REPLIES 3
v-ssriganesh
Community Support
Community Support

Hello @liney_marcela,
Thank you for reaching out to the Microsoft Fabric Forum Community. Here's how you can approach this issue:

In your child pipeline, at the end of Pipeline A, use the Set Variable activity to create your dynamic output, ensuring you're using the correct structure.

  • In Pipeline B, when you set up the Invoke Pipeline activity, be sure to configure the Pipeline Return Value to be of type Expression. This will allow you to pass complex outputs rather than just plain text.
  • When you retrieve the return value in the parent pipeline, you’ll want to use the @json function. This converts the string back to a JSON object, which you can then utilize in activities like a ForEach loop. For instance, in your ForEach loop's Items section, you can specify @json(variables('yourVariableName')), where yourVariableName is the name of the variable you set in the child pipeline.

Thank you, @justinjbird for sharing your valuable insights.

If this information is helpful, please “Accept as solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
Thank you.

I'd be looking to accept @justinjbird solution as you've simply repeated what he replied with.

justinjbird
Regular Visitor

Pipeline return value will allow you to do this if you set the type to expression and pass your variable value in. The key step is to convert the variable back from a string using the `@json` function, so it can be used by the for each loop.

 

It should look something like this `@json(variables('var'))` you can either do that in the set variable task that is setting the return value, or in the `items` section of the for each loop.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

June FBC25 Carousel

Fabric Monthly Update - June 2025

Check out the June 2025 Fabric update to learn about new features.

Top Solution Authors