Forum Discussion
Notebook default lakehouse error
- 1 year ago
Hi g3kuser,
Thanks for posting your query in Microsoft fabric community forum.The issue you're facing with the default Lakehouse when using notebook.runMultiple(). The error occurs because Notebook Main does not have a Lakehouse attached, and even though it isn't running Spark queries directly, it still manages the execution environment for child notebooks.
Try the following steps:
- Open Notebook Main. Attach a Lakehouse (either the same one as Notebook A or a temporary one). Save Notebook Main with this attached Lakehouse and Execute Notebook Main again.
- This will ensure that Notebook A inherits the necessary Lakehouse context, preventing the error.
If this helps, then please Accept it as a solution and dropping a "Kudos" so other members can find it more easily.
Hope this works for you!
Thank you.
Hello g3kuser
When you run Notebook A individually, it works because it dynamically attaches a default Lakehouse. However, when Notebook A is invoked from Notebook Main using notebook.runMultiple, the context of the default Lakehouse is not carried over, causing the error
Use the %%configure magic command to define the default Lakehouse programmatically at the start of Notebook A.
%%configure -f
{
"defaultLakehouse": {
"name": "<lakehouse_name>",
"id": "<lakehouse_id>",
"workspaceId": "<workspace_id>"
}
}
If this helps please accept the answer