Skip to content

Latest commit

 

History

History
113 lines (78 loc) · 5.75 KB

File metadata and controls

113 lines (78 loc) · 5.75 KB

Passing Parameters to a Notebook from a Pipeline - Quick Guide

Costa Rica

GitHub brown9804

Last updated: 2025-03-05


List of References (Click to expand)

Content

Create a Microsoft Fabric Workspace

  1. Sign in to Power BI: Go to the Power BI Service and log in.
  2. Create a New Workspace:
    • From the navigation pane, select Workspaces.

    • Click on + New workspace.

      image
    • In the Create a workspace pane, enter a name for your workspace.

      image
    • Expand the Advanced section and choose either the Fabric capacity or Trial license mode.

    • Select Apply to create and open the new workspace

      image

Create a Notebook with Parameters

  1. Go to Your Workspace:

    1. Sign in to Power BI: Go to the Power BI Service and log in.
    2. Navigate to Workspaces: From the navigation pane, select Workspaces.
    3. Select Your Workspace: Choose the workspace where you want to create the new item.
  2. Create a New Item

    1. Click on New Item: In your workspace, click on the New item button.

    2. Choose the Item Type: From the list of item types, select Notebook.

      image
  3. Create and Configure the Notebook

    1. Provide a Name: Enter a name for your new notebook.

    2. Configure the Notebook: You can configure various settings for your notebook, such as the language (e.g., Python, Scala) and the environment.

      image
  4. Define Parameters in the Notebook

    1. Open the Notebook: Once the notebook is created, open it.

    2. Define Parameters: Add a cell to define the parameters you want to pass. For example:

      # Parameters
      file_path = "" # expected value format: abfss://<your-container-name>@<your-storage-account-name>.dfs.core.windows.net/<your-bronze-lakehousename>.Lakehouse/Tables/<table name>
      token = ""
  5. Mark as Parameter Cell: Select the Toggle Parameter Cell option to mark the cell as a parameter cell

    image
  6. Save and Use the Notebook

    1. Save the Notebook: Save your notebook to ensure all changes are applied.

    2. Use the Notebook in a Pipeline: You can now use this notebook in a pipeline and pass parameters to it as needed.

      image

Using the Notebook in a Pipeline

  1. Open the Notebook: Navigate to the notebook you created in your Microsoft Fabric workspace.

  2. Go to the Run Tab: In the notebook view, click on the Run tab at the top of the page.

  3. Add to Pipeline: Under the Run* tab, select the Add to pipeline option. This will allow you to add the notebook to a new or existing pipeline.

    1. Create a New Pipeline: If you don't have an existing pipeline, you can create a new one by providing a name and selecting Create.

    2. Select an Existing Pipeline: If you already have a pipeline, select it from the list of available pipelines.

      image image
  4. Configure the Notebook Activity

    1. Open Pipeline Editor: Once the notebook is added to the pipeline, the pipeline editor will open.

      image
    2. Select the Notebook Activity: Click on the Notebook activity that was added to the pipeline.

    3. Configure Parameters: In the Settings tab of the Notebook activity, find the Parameters section. Add the parameters you want to pass to the notebook. Ensure the parameter names match the names defined in the notebook. For example:

      {
          "file_path": "/path/to/your/file",
          "token": "your_token_here"
      }
Dynamic_notebook-pipeline-parameters.mp4

Total Visitors

Visitor Count