Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin the OneLake & Platform Admin teams for an ask US anything on July 16th. Join now.
Hi,
I'd like to know if a notebook could be parameterized and how.
Any suggests to me, please? Thanks
Solved! Go to Solution.
Hi @pmscorca ,
Yes, you can parameterize notebooks in Fabric Lakehouse, I have two ways here.
1. You can pass parameters from a data pipeline to a notebook in Fabric Lakehouse:
In the notebook, define the parameters you want. Make sure to select the Toggle Parameter Cell option under More Commands.
In the pipeline, add a Notebook activity and select the notebook you created.
In the Settings tab of the Notebook activity, under the Parameters section, add the parameters you want to pass to the notebook. Make sure the parameter names match the parameter names in the notebook.
2. You can also configure the default lakehouse programmatically by passing parameters to the cell:
Define the parameters in the notebook:
# Parameters
defaultLakehouseName = "MyLakehouse"
defaultLakehouseId = "12345"
Set the parameters using %%configure:
%%configure
{
"defaultLakehouse": {
"name": {"parameterName": "defaultLakehouseName", "defaultValue": "MyLakehouse"},
"id": {"parameterName": "defaultLakehouseId", "defaultValue": "12345"}
}
}
For more information on parameterized session configuration, see the following documentation:
Develop, execute, and manage notebooks - Microsoft Fabric | Microsoft Learn
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Hi @pmscorca ,
Yes, you can parameterize notebooks in Fabric Lakehouse, I have two ways here.
1. You can pass parameters from a data pipeline to a notebook in Fabric Lakehouse:
In the notebook, define the parameters you want. Make sure to select the Toggle Parameter Cell option under More Commands.
In the pipeline, add a Notebook activity and select the notebook you created.
In the Settings tab of the Notebook activity, under the Parameters section, add the parameters you want to pass to the notebook. Make sure the parameter names match the parameter names in the notebook.
2. You can also configure the default lakehouse programmatically by passing parameters to the cell:
Define the parameters in the notebook:
# Parameters
defaultLakehouseName = "MyLakehouse"
defaultLakehouseId = "12345"
Set the parameters using %%configure:
%%configure
{
"defaultLakehouse": {
"name": {"parameterName": "defaultLakehouseName", "defaultValue": "MyLakehouse"},
"id": {"parameterName": "defaultLakehouseId", "defaultValue": "12345"}
}
}
For more information on parameterized session configuration, see the following documentation:
Develop, execute, and manage notebooks - Microsoft Fabric | Microsoft Learn
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Fabric update to learn about new features.