<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Using &amp;quot;Save As Table&amp;quot; Without having a default lakehouse in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Using-quot-Save-As-Table-quot-Without-having-a-default-lakehouse/m-p/4778784#M11312</link>
    <description>&lt;P&gt;Changing the default lakehouse in a notebook doesn't seem possible.&amp;nbsp;&lt;BR /&gt;.. It requires the re-init of the pyspark session.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;(This seems like a frustrating issue that lots of other users have discussed in the past, so I won't revisit that.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I'm trying to do is avoid the need for a "default lakehouse".&amp;nbsp; In the code below I'm saving a parquet file to the "&lt;STRONG&gt;Files&lt;/STRONG&gt;" storage in a lakehouse, and trying to register a "Table"&amp;nbsp; for it as well, in the "&lt;STRONG&gt;Tables&lt;/STRONG&gt;" list.&amp;nbsp; However this doesn't appear to be possible&amp;nbsp; It ignores my request to register the table.&amp;nbsp; I find that the parquet file is stored properly (in "Files") but the "Table" operation is ignored unless I run the notebook with a default lakehouse configured:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone tell me if there is a way to get this to work?&amp;nbsp; Why does the "&lt;STRONG&gt;saveAsTable&lt;/STRONG&gt;" not allow me to specify the abfss location of the lakehouse?&amp;nbsp; That would obviate the need to set a "default lakehouse"?&lt;BR /&gt;&lt;BR /&gt;Is there another mechanism to register an "external table" with a more &lt;STRONG&gt;direct API&lt;/STRONG&gt;&amp;nbsp;that is more native to this Fabric environment.&amp;nbsp; I think the problem is that "saveAsTable" is an API interface defined in Apache Spark and Microsoft is trying to implement it in a way that is true to the spirit of Spark.&amp;nbsp; But perhaps there is a totally different API to simply tell the lakehouse about my parquet file, and get it to register the table under "Tables".&amp;nbsp; This really shouldn't be so hard.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Jul 2025 14:24:48 GMT</pubDate>
    <dc:creator>dbeavon3</dc:creator>
    <dc:date>2025-07-28T14:24:48Z</dc:date>
    <item>
      <title>Using "Save As Table" Without having a default lakehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Using-quot-Save-As-Table-quot-Without-having-a-default-lakehouse/m-p/4778784#M11312</link>
      <description>&lt;P&gt;Changing the default lakehouse in a notebook doesn't seem possible.&amp;nbsp;&lt;BR /&gt;.. It requires the re-init of the pyspark session.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;(This seems like a frustrating issue that lots of other users have discussed in the past, so I won't revisit that.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I'm trying to do is avoid the need for a "default lakehouse".&amp;nbsp; In the code below I'm saving a parquet file to the "&lt;STRONG&gt;Files&lt;/STRONG&gt;" storage in a lakehouse, and trying to register a "Table"&amp;nbsp; for it as well, in the "&lt;STRONG&gt;Tables&lt;/STRONG&gt;" list.&amp;nbsp; However this doesn't appear to be possible&amp;nbsp; It ignores my request to register the table.&amp;nbsp; I find that the parquet file is stored properly (in "Files") but the "Table" operation is ignored unless I run the notebook with a default lakehouse configured:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone tell me if there is a way to get this to work?&amp;nbsp; Why does the "&lt;STRONG&gt;saveAsTable&lt;/STRONG&gt;" not allow me to specify the abfss location of the lakehouse?&amp;nbsp; That would obviate the need to set a "default lakehouse"?&lt;BR /&gt;&lt;BR /&gt;Is there another mechanism to register an "external table" with a more &lt;STRONG&gt;direct API&lt;/STRONG&gt;&amp;nbsp;that is more native to this Fabric environment.&amp;nbsp; I think the problem is that "saveAsTable" is an API interface defined in Apache Spark and Microsoft is trying to implement it in a way that is true to the spirit of Spark.&amp;nbsp; But perhaps there is a totally different API to simply tell the lakehouse about my parquet file, and get it to register the table under "Tables".&amp;nbsp; This really shouldn't be so hard.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jul 2025 14:24:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Using-quot-Save-As-Table-quot-Without-having-a-default-lakehouse/m-p/4778784#M11312</guid>
      <dc:creator>dbeavon3</dc:creator>
      <dc:date>2025-07-28T14:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: Using "Save As Table" Without having a default lakehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Using-quot-Save-As-Table-quot-Without-having-a-default-lakehouse/m-p/4778911#M11316</link>
      <description>&lt;P&gt;Here is the type of error we see from a notebook, when a default lakehouse isn't specified:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;AnalysisException&lt;/SPAN&gt;&lt;SPAN&gt;: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Spark SQL queries are only possible in the context of a lakehouse. Please attach a lakehouse to proceed.)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jul 2025 15:57:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Using-quot-Save-As-Table-quot-Without-having-a-default-lakehouse/m-p/4778911#M11316</guid>
      <dc:creator>dbeavon3</dc:creator>
      <dc:date>2025-07-28T15:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: Using "Save As Table" Without having a default lakehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Using-quot-Save-As-Table-quot-Without-having-a-default-lakehouse/m-p/4782002#M11368</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="120263" data-lia-user-login="dbeavon3" class="lia-mention lia-mention-user"&gt;dbeavon3&lt;/a&gt;&amp;nbsp;In Fabric architecture, a notebook must be bound to a Lakehouse, therefore there is a default lakehouse attached to a notebook. As you correctly noticed, &lt;STRONG&gt;.saveAsTable()&lt;/STRONG&gt; does not allow you to specify an abss path to the table on OneLake because it works with &lt;STRONG&gt;managed&lt;/STRONG&gt; tables that are bound to a default lakehouse. If you have another lakehouse in your workspace or in a differrent workspace you can still save your data in a Delta table format but you'll need to use &lt;STRONG&gt;.save()&lt;/STRONG&gt; wtih abss path which will create an &lt;STRONG&gt;external&lt;/STRONG&gt; table in a target lakehouse.&lt;BR /&gt;&lt;BR /&gt;In the code example below you can see that I have two lakehouses in a workspace, the &lt;STRONG&gt;Lakehouselab&lt;/STRONG&gt; set as a default for the notebook. However I can succeefully save a dataframe into another non-default lakehouse with this technique.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, you won't be able to use this external table in a lakehouse because it's currently not supported in Fabric (see this &lt;A href="https://community.fabric.microsoft.com/t5/Fabric-platform/External-Tables-in-Fabric/m-p/3751986#M4951" target="_blank"&gt;Solved: Re: External Tables in Fabric - Microsoft Fabric Community&lt;/A&gt;), so essentially, this entire exercise is useless. In a nutshell, external delta tables are not needed in Fabric because they can be replaced wiht a shortcut to an external data source.&lt;BR /&gt;&lt;BR /&gt;However, your original question was about default lakehouse in a notebook, and the answer is yes,&amp;nbsp;default lakehouse is absolutely necessary in Fabric. The default lakehouse can be reconfigured in a deployment pipeline when a notebook is moved to another workspace.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jul 2025 00:12:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Using-quot-Save-As-Table-quot-Without-having-a-default-lakehouse/m-p/4782002#M11368</guid>
      <dc:creator>apturlov</dc:creator>
      <dc:date>2025-07-31T00:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: Using "Save As Table" Without having a default lakehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Using-quot-Save-As-Table-quot-Without-having-a-default-lakehouse/m-p/4782062#M11373</link>
      <description>&lt;P&gt;I'll check out the shortcuts.&amp;nbsp; Thanks for the pointer.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jul 2025 02:00:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Using-quot-Save-As-Table-quot-Without-having-a-default-lakehouse/m-p/4782062#M11373</guid>
      <dc:creator>dbeavon3</dc:creator>
      <dc:date>2025-07-31T02:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: Using "Save As Table" Without having a default lakehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Using-quot-Save-As-Table-quot-Without-having-a-default-lakehouse/m-p/4788687#M11525</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="120263" data-lia-user-login="dbeavon3" class="lia-mention lia-mention-user"&gt;dbeavon3&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for reaching out to the Microsoft Fabric Forum Community.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1258887" data-lia-user-login="apturlov" class="lia-mention lia-mention-user"&gt;apturlov&lt;/a&gt;&amp;nbsp; Thanks for the inputs.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;I hope the information provided by user was helpful. If you still have questions, please don't hesitate to reach out to the community.&amp;nbsp;&lt;BR /&gt;Thank you for your understanding.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Aug 2025 09:47:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Using-quot-Save-As-Table-quot-Without-having-a-default-lakehouse/m-p/4788687#M11525</guid>
      <dc:creator>v-priyankata</dc:creator>
      <dc:date>2025-08-06T09:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Using "Save As Table" Without having a default lakehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Using-quot-Save-As-Table-quot-Without-having-a-default-lakehouse/m-p/4793024#M11642</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="120263" data-lia-user-login="dbeavon3" class="lia-mention lia-mention-user"&gt;dbeavon3&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wanted to check if you had the opportunity to review the information provided by user. Please feel free to contact us if you have any further questions.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Aug 2025 10:17:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Using-quot-Save-As-Table-quot-Without-having-a-default-lakehouse/m-p/4793024#M11642</guid>
      <dc:creator>v-priyankata</dc:creator>
      <dc:date>2025-08-11T10:17:16Z</dc:date>
    </item>
  </channel>
</rss>

