Forum Discussion
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.
is this is helpful please accept the solution
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
- nilendraFabric
Super User
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.
is this is helpful please accept the solution
- Mongia_CherifFrequent Visitor
- nilendraFabric
Super User
https://community.fabric.microsoft.com/t5/Data-Pipeline/notebook-parameter/m-p/3907708
Have you checked this ?
- v-karpurapud
Community 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!
- AnonymousNot 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.