Fabric Data Factory Design Pattern – Parent-Child with Parameters

In an earlier post, I demonstrated one way to build a basic parent-child design pattern in Fabric Data Factory by calling one pipeline (child) from another (parent). In this post, I modify the parent and child pipelines to demonstrate calling a child pipeline that contains a parameter. In this post, we will:

  • Clone and edit the child pipeline
  • Clone and edit the parent pipeline
  • Test

Clone and Edit the Child Pipeline

Open the workspace from the earlier post.

  1. Click the ellipsis beside the pipeline named “child-1”
  2. Click “Save as”:

When the pipeline “Save As” dialog displays,

  1. Set the Name of the new pipeline to “child-2-param”
  2. Click the “Save” button:

When the child-2-param pipeline displays,

  1. Click the “Parameters” tab
  2. Click the “+ New” button
  3. Set the “Name” property of the new parameter to “waitSeconds”
  4. Click the “Type” property dropdown
  5. Select “Int”:

Not shown above: I set the default value to 2.

Next,

  1. Click the Wait activity to select it
  2. Click the Settings tab
  3. Click inside the “Wait time in seconds” property value entry
  4. When the “Add dynamic content [Alt + Shift + D]” link displays, click it to open the “Pipeline expression builder” blade:

When the “Pipeline expression builder” blade displays,

  1. Click the “parameters” tab (which should display by default)
  2. Click the “waitSeconds” parameter (which should cause the expression “@pipeline().parameters.waitSeconds” to display in the “Add dynamic content below using any combination of expressions, functions and system variables” value textbox)
  3. Click the “OK: button:

Once configured, the “Wait time in seconds” property value appears as shown:

  1. Save the “child-2-param” pipeline
  2. Test-execute (Run) the “child-2-param” pipeline:

When the “Pipeline run” blade displays, click the “OK” button to proceed.

Clone and Edit the Parent Pipeline

As before with the child pipeline, clone the parent pipeline using the “Save as” functionality at the workspace level.

  1. Click the ellipsis beside the pipeline named “invoke-child-pipeline”
  2. Click “Save as”:

When the pipeline “Save As” dialog displays,

  1. Set the Name of the new pipeline to “invoke-child-pipeline-with-params”
  2. Click the “Save” button:

  1. Click the “Invoke Pipeline (Preview)” activity
  2. Click the “Pipeline” property dropdown
  3. If the pipeline list is not up-to-date, click the refresh button:

Set the “Pipeline” property value to “child-2-param”:

Once the “child-2-param” pipeline is selected, the Parameters property reads the “waitSeconds” parameter from the child pipeline and displays the child parameter and its default value (2). I updated the value to 3:

Test

Next, Save the parent pipeline…

…and then Run it:

If all goes according to plan, the test execution succeeds:

  1. Click the Output image
  2. Click the pipelineRunId link to open the Monitoring Hub for the child pipeline execution:

Pipeline execution details for the child pipeline (child-2-param) display.

Click the Parameters count link to view the parameter(s) value for this execution:

The value configured in the parent pipeline’s Invoke Pipeline (Preview) activity’s Parameters property – 3 – is the value sent to the child pipeline:

Conclusion

To learn more from me about the new Invoke Pipeline (Preview) activity, register for Enterprise Data & Analytics Fabric training and subscribe to my newsletter:

 

Andy Leonard

andyleonard.blog

Christian, husband, dad, grandpa, Data Philosopher, Data Engineer, Azure Data Factory, SSIS guy, and farmer. I was cloud before cloud was cool. :{>

One thought on “Fabric Data Factory Design Pattern – Parent-Child with Parameters

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.