Forum Discussion

Mongia_Cherif's avatar
Mongia_Cherif
Frequent Visitor
1 year ago
Solved

pass a dynamic variable from pipeline to notebook

I want to pass a dynamic variable to the notebook i add the variable in the 'parametre de base' in the notebook activity how can i use it inside the notebook 

 

  • hello Mongia_Cherif 

     

    Step1: Create a notebook with required parameters. And make sure to select “toggle parameter cell” under more commands.

     

     

     

     

     

    Step 2: Create a Pipeline for notebook activity and select the notebook in the settings option which you have created. And pass the parameters under “base parameters”.

     

    Note : Name should be same in base parameters and notebook in order to pass the parameter.

     

     

     

     

    https://community.fabric.microsoft.com/t5/Data-Pipeline/notebook-parameter/m-p/3907708#:~:text=Step1%3A%20Create%20a%20notebook%20with,parameters%20under%20%E2%80%9Cbase%20parameters%E2%80%9D.

     

     

    is this is helpful please accept the solution

     

  • v-karpurapud's avatar
    v-karpurapud
    1 year ago

    Hello Mongia_Cherif 

     

    Thank you nilendraFabric  for your response.

     

    Thank you for reaching out to the Microsoft Fabric Community Forum. We understand  your requirement regarding passing a dynamic variable from pipeline to notebook. Consider the following to achieve this:

     

    • Create a dynamic variable in the pipeline using a set variable activity and create a notebook or use existing notebook in pipeline.
    • Connect it after the "Set Variable" activity. Now pass the dynamic variable through the base parameters section in notebook.

       

        

     

    • Once the parameter is passed from the pipeline now retrieve the value inside the Fabric Notebook using necessary libraries. 

       

    If my response has resolved your query, please mark it as the Accepted Solution to help others. Additionally, I would appreciate a 'Kudos' if you found my response helpful.

     

    Thank you!

5 Replies

  • hello Mongia_Cherif 

     

    Step1: Create a notebook with required parameters. And make sure to select “toggle parameter cell” under more commands.

     

     

     

     

     

    Step 2: Create a Pipeline for notebook activity and select the notebook in the settings option which you have created. And pass the parameters under “base parameters”.

     

    Note : Name should be same in base parameters and notebook in order to pass the parameter.

     

     

     

     

    https://community.fabric.microsoft.com/t5/Data-Pipeline/notebook-parameter/m-p/3907708#:~:text=Step1%3A%20Create%20a%20notebook%20with,parameters%20under%20%E2%80%9Cbase%20parameters%E2%80%9D.

     

     

    is this is helpful please accept the solution

     

    • v-karpurapud's avatar
      v-karpurapud
      Icon for Community Support rankCommunity Support

      Hello Mongia_Cherif 

       

      Thank you nilendraFabric  for your response.

       

      Thank you for reaching out to the Microsoft Fabric Community Forum. We understand  your requirement regarding passing a dynamic variable from pipeline to notebook. Consider the following to achieve this:

       

      • Create a dynamic variable in the pipeline using a set variable activity and create a notebook or use existing notebook in pipeline.
      • Connect it after the "Set Variable" activity. Now pass the dynamic variable through the base parameters section in notebook.

         

          

       

      • Once the parameter is passed from the pipeline now retrieve the value inside the Fabric Notebook using necessary libraries. 

         

      If my response has resolved your query, please mark it as the Accepted Solution to help others. Additionally, I would appreciate a 'Kudos' if you found my response helpful.

       

      Thank you!

      • Anonymous's avatar
        Anonymous
        Not applicable

        This is the correct way, but is this the only way to pass parameters? For every notebook which needs to pass parameter to the next notebook in the pipeline, a set varaible activity needs to be created? This seems to be a very long process.