Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
pmscorca
Kudo Kingpin
Kudo Kingpin

Parameterizing a notebook

Hi,

I'd like to know if a notebook could be parameterized and how.

Any suggests to me, please? Thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

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:

 

  1. Create a notebook with parameters:

 

In the notebook, define the parameters you want. Make sure to select the Toggle Parameter Cell option under More Commands.

vhuijieymsft_0-1720142680713.png

 

vhuijieymsft_1-1720142680715.png

 

  1. Create a pipeline for the Notebook activity:

 

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.

vhuijieymsft_2-1720142692468.png

 

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!

View solution in original post

1 REPLY 1
Anonymous
Not applicable

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:

 

  1. Create a notebook with parameters:

 

In the notebook, define the parameters you want. Make sure to select the Toggle Parameter Cell option under More Commands.

vhuijieymsft_0-1720142680713.png

 

vhuijieymsft_1-1720142680715.png

 

  1. Create a pipeline for the Notebook activity:

 

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.

vhuijieymsft_2-1720142692468.png

 

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!

Helpful resources

Announcements
FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Fabric Update Carousel

Fabric Monthly Update - March 2026

Check out the March 2026 Fabric update to learn about new features.