Forum Discussion
Cannot detach data item from notebook
- 6 months ago
Hello NotebookEnjoyer
What you're experiencing is how Fabric Notebooks are designed to behave!
In a Fabric notebook, only ONE Warehouse can be the “primary” Warehouse. The first attached Warehouse becomes permanently bound. That primary Warehouse can never be removed. Any additional Warehouses are secondary and can be removed. You can try this with the other Warehouse you have attached.
It seems the one you tried to remove is the first Warehouse you attached to your notebook.
Fabric internally assigns the first Warehouse as Notebook SQL execution context. So it follows this rule
First Warehouse = permanent
Subsequent Warehouses = optional
If you want to “change” the primary Warehouse:
- Create a new notebook
- Attach the desired Warehouse first
- Copy notebook content
- Delete the old notebook
This is the only supported way to change the primary Warehouse.
- 4 months ago
Hi, same problem, the solution that i found was deleting all sources from the OneLake source and then adding them again.
Hello NotebookEnjoyer
The workaround mentioned by Srisakthi is valid, however I don't think that applies to your case. I looked closely at your screenshot to identify the type of data item you're dealing with - in your case it is a Warehouse, although you've named it BC_140_TEST_Lakehouse.
The "Set as default lakehouse" option will show on a Lakehouse, not on a Warehouse item! The first Warehouse you add to your Notebook is permanent - you can't delete that, for reasons I mentioned in my first response to you.
- Srisakthi5 months agoSuper User
Hi deborshi_nag ,
You are right , we cannot do it on "Warehouse". But once we attach a lakehouse to notebook(which is already attached with warehouse first) in my case it allows to remove warehouse. Fabric automatically assign lakehouse as default.
Thanks,
Srisakthi