Pass Parent Pipeline Params to Child Pipeline then Use Params in Child Lookup Stored Procedure

libpekin 166 Reputation points
2024-09-11T19:56:34.6+00:00

Hello,

Help passing parent pipeline params to child pipeline, then use the passed params in a Lookup Activity which calls a stored procedure that takes the params as inputs.

Thanks!

User's image

User's image

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,680 questions
{count} votes

Accepted answer
  1. Amira Bedhiafi 24,531 Reputation points
    2024-09-11T20:55:20.0733333+00:00
    1. Define Parameters in Child Pipeline:
      • Open your child pipeline.
      • Go to the Parameters tab of the pipeline.
      • Add the necessary parameters that the parent pipeline will pass (e.g., param1, param2).
    2. Pass Parameters from Parent Pipeline to Child Pipeline:
      • Open the Execute Pipeline activity in the parent pipeline that calls the child pipeline.
      • Under the Settings tab of the Execute Pipeline activity, you’ll see a Parameters section.
      • Map the parameters defined in the child pipeline to the appropriate values or expressions in the parent pipeline.
      Example:
      
         {
      
           "param1": "@pipeline().parameters.ParentParam1",
      
           "param2": "@pipeline().parameters.ParentParam2"
      
         }
      
      
    3. Use Parameters in Child Pipeline's Lookup Activity:
    • Inside the child pipeline, add a Lookup Activity.
      • In the Settings tab, configure the Lookup Activity to use a stored procedure.
      • In the stored procedure settings, map the parameters to the stored procedure's inputs.
      Example: If your stored procedure takes two input parameters (@input1, @input2), you can use the child pipeline parameters like this:
         
         {
         
         "@input1": "@pipeline().parameters.param1",
         
         "@input2": "@pipeline().parameters.param2"
         
         }
         
      
    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. phemanth 10,325 Reputation points Microsoft Vendor
    2024-09-12T11:37:27.1533333+00:00

    @libpekin

    Thanks for reaching out to Microsoft Q&A.

    Check 1: Verify Parent Pipeline Parameters

    In the parent pipeline, go to the Execute Pipeline activity that calls the child pipeline. Under the Settings tab, check that the parameters are being passed correctly. Make sure that the parameter names and values are correct.

    Check 2: Verify Child Pipeline Parameters

    In the child pipeline, go to the Parameters tab and verify that the parameters param1 and param2 are defined correctly.

    Check 3: Verify Execute Pipeline Activity Settings

    In the parent pipeline, go to the Execute Pipeline activity that calls the child pipeline. Under the Settings tab, check that the Parameters section is correctly configured. Make sure that the parameter names and values are correct, and that they match the parameter names defined in the child pipeline.

    Check 4: Verify Lookup Activity Settings

    In the child pipeline, go to the Lookup activity that calls the stored procedure. Under the Settings tab, check that the Stored procedure section is correctly configured. Make sure that the parameter names and values are correct, and that they match the parameter names defined in the stored procedure.

    • Try debugging the pipelines by enabling Debug mode in the parent pipeline and checking the output of the Execute Pipeline activity.
    • Check the Output tab of the Execute Pipeline activity to see if the parameters are being passed correctly.
    • Verify that the stored procedure usp_loading_bronze is correctly defined and that it expects the correct input parameters @param1 and @param2.

    Hope this helps. Do let us know if you any further queries.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.