Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I want to configure defualt laekhouse in notebook. i can do it using %%configure command. but i am note able to use variables here to be used in %%configure command. As configure should be the first cell of the notebook and if you put it in middle of the notebook then you have to force restart session, but problem is when i restart session, my variables will be erased.
I also tried this, but getting this error
How to resolve it. i also tried using mount, but that is also not working
Solved! Go to Solution.
Hi @ketankhunti
The configure magic has to be the first cell and be at the beginning of the first cell, so we can't programmatically assign the lakehouse id or name in the configure json via a variable or config file. This is the main obstacle.
Do you must set up the default lakehouse for the notebook? If not, you could try mounting a lakehouse to the notebook. Then you will be able to use the relative File API path to reference the tables and files in the lakehouse. This doesn't specify a default lakehouse.
Another option is to use the ABFS path to reference a lakehouse. With ABFS path, you can always reference tables and files in a lakehouse correctly, without bothering whether it's the default lakehouse.
The third link I listed below introduces a method to update the default lakehouse. I haven't tested that. You may give it a try. You might need to modify the default lakehouse for other notebooks with a new notebook.
References:
How to Attach a Default Lakehouse to a Notebook in Fabric
How To Mount A Lakehouse and Identify Mounted Lakehouses in Fabric
Programmatically Removing & Updating Default Lakehouse Of A Fabric Notebook
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
Hi @ketankhunti
The configure magic has to be the first cell and be at the beginning of the first cell, so we can't programmatically assign the lakehouse id or name in the configure json via a variable or config file. This is the main obstacle.
Do you must set up the default lakehouse for the notebook? If not, you could try mounting a lakehouse to the notebook. Then you will be able to use the relative File API path to reference the tables and files in the lakehouse. This doesn't specify a default lakehouse.
Another option is to use the ABFS path to reference a lakehouse. With ABFS path, you can always reference tables and files in a lakehouse correctly, without bothering whether it's the default lakehouse.
The third link I listed below introduces a method to update the default lakehouse. I haven't tested that. You may give it a try. You might need to modify the default lakehouse for other notebooks with a new notebook.
References:
How to Attach a Default Lakehouse to a Notebook in Fabric
How To Mount A Lakehouse and Identify Mounted Lakehouses in Fabric
Programmatically Removing & Updating Default Lakehouse Of A Fabric Notebook
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
User | Count |
---|---|
33 | |
14 | |
6 | |
3 | |
2 |
User | Count |
---|---|
39 | |
22 | |
11 | |
7 | |
6 |