attach_lakehouse_to_notebook
Set a default lakehouse for a Microsoft Fabric notebook to automatically mount lakehouse tables and files when the notebook runs, enabling Spark data access without manual configuration.
Instructions
Attach a default lakehouse to a notebook in Microsoft Fabric.
Updates the notebook definition to set a default lakehouse. This lakehouse will be automatically mounted when the notebook runs, providing seamless access to the lakehouse tables and files without additional configuration.
Use this tool when:
Setting up a new notebook with a lakehouse connection
Changing the default lakehouse for an existing notebook
Ensuring notebook code can access lakehouse tables via spark.read
Parameters: workspace_name: The display name of the workspace containing the notebook. notebook_name: Name of the notebook to update. lakehouse_name: Name of the lakehouse to attach as default. lakehouse_workspace_name: Optional workspace name for the lakehouse. If not provided, uses the same workspace as the notebook.
Returns: Dictionary with status, message, notebook_id, notebook_name, lakehouse_id, lakehouse_name, and workspace_id.
Example: ```python # Attach lakehouse in same workspace result = attach_lakehouse_to_notebook( workspace_name="Analytics Workspace", notebook_name="Data_Processing", lakehouse_name="Bronze_Lakehouse" )
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspace_name | Yes | ||
| notebook_name | Yes | ||
| lakehouse_name | Yes | ||
| lakehouse_workspace_name | No |