Forum Discussion
Attach multiple lakehouse to a single notebook.
- 7 months ago
Hi V-yubandi-msft , sorry for coming back late on this, I was on leave and not feeling well. The issue is resolved now. Was able to attach multiple lakehouses to the notebook which resolved the issue
KrishnaMoola you can add multiple lakehouses to a notebook.
In your notebook, click the add data items button:
then you can choose an existing datasource and add another lakehouse:
THe default lakehouse is still the one with the pin beside it, so to reference the other lakehouse you need to use the full identifier:
GatewayLogs.dbo.table1, not just dbo.table1
If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.
- KrishnaMoola8 months agoRegular Visitor
I have given GatewayLogs.dbo.table1 but still no luck, so have created a shortcut to the metadata lakehouse and this works. I am not sure if this is correct way to do
- V-yubandi-msft8 months ago
Community Support
Hi KrishnaMoola ,
Thanks for the update. Creating a shortcut will work because it exposes the Silver table inside your default lakehouse, so Spark is able to resolve it. However, this is more of a workaround.
The recommended approach is to attach the Silver lakehouse as a Data item in the notebook. Once both lakehouses are attached, the tables in Silver should be recognised directly using the standard namespace format.
So your shortcut isn’t incorrect but attaching the Silver lakehouse as a data item is cleaner and keeps the table where it belongs.
If you still can’t reference the tables after attaching the Silver lakehouse, please let us know and we’ll help investigate further