<?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 Re: cannot write to lakehouse with schema enabled 3 part naming in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/cannot-write-to-lakehouse-with-schema-enabled-3-part-naming/m-p/4283231#M5177</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/582570"&gt;@kely&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My previous reply is based on my testing results, without any documentation supporting. So I'm not sure whether it's expected behavior, or it's a limitation, or it might be improved in the future.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your notebook is currently using a 'bronze' lakehouse as the default lakehouse,&amp;nbsp;&lt;SPAN&gt;using&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;saveAsTable&lt;/STRONG&gt;&amp;nbsp;with '&lt;SPAN&gt;goldlakehouse.schema.table&lt;/SPAN&gt;' is probably not valid. Usually switching the default lakehouse of a running notebook will need to terminate the session first. If I understand it correctly, one session can have only one default lakehouse. So at least one lakehouse needs to use the ABFS path in the notebook.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As of now, I recommend using &lt;STRONG&gt;ABFS&lt;/STRONG&gt; paths and &lt;STRONG&gt;save&lt;/STRONG&gt; function to write the dataframe in your case. This is more reliable.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Jing&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Nov 2024 06:58:55 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-14T06:58:55Z</dc:date>
    <item>
      <title>cannot write to lakehouse with schema enabled 3 part naming</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/cannot-write-to-lakehouse-with-schema-enabled-3-part-naming/m-p/4280120#M5140</link>
      <description>&lt;P&gt;I am using a pyspark notebook, reading data from one lakehouse (not schema enabled) to another lakehouse (schema enabled) in the same workspace... however:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it ONLY works if I use: df.write.format("delta").mode("overwrite").option("mergeSchema", "true").save("&lt;STRONG&gt;abfss://abc123@onelake.dfs.fabric.microsoft.com/def456/Tables/dim/testnewtable")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;when I should be able to use: df.write.format("delta").mode("overwrite").option("mergeSchema", "true").saveAsTable("&lt;STRONG&gt;testingSchemas.dim.testnewtable&lt;/STRONG&gt;").&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG&gt;This seems like a bug to me, as non schema-enabled lakehouses work like my 2nd example just fine.&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2024 15:39:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/cannot-write-to-lakehouse-with-schema-enabled-3-part-naming/m-p/4280120#M5140</guid>
      <dc:creator>kely</dc:creator>
      <dc:date>2024-11-12T15:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: cannot write to lakehouse with schema enabled 3 part naming</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/cannot-write-to-lakehouse-with-schema-enabled-3-part-naming/m-p/4280349#M5141</link>
      <description>&lt;P&gt;This could be a public preview limitation. There's a few items listed in the limitations section talking about part naming conventions, it may be that this particular issue isn't documented.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-engineering/lakehouse-schemas#public-preview-limitations" target="_blank"&gt;https://learn.microsoft.com/en-us/fabric/data-engineering/lakehouse-schemas#public-preview-limitations&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It may be useful to create an Idea to make sure this functionality is being looked at&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2024 18:09:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/cannot-write-to-lakehouse-with-schema-enabled-3-part-naming/m-p/4280349#M5141</guid>
      <dc:creator>AndyDDC</dc:creator>
      <dc:date>2024-11-12T18:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: cannot write to lakehouse with schema enabled 3 part naming</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/cannot-write-to-lakehouse-with-schema-enabled-3-part-naming/m-p/4280405#M5142</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/582570"&gt;@kely&lt;/a&gt;&amp;nbsp;thanks for sharing your workaround.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess in the future we will all be using schema enabled Lakehouses, once they turn GA.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But we will have many existing Lakehouses that are not schema enabled.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So we will need to be able to work with both of them at the same time, like you're wanting to do.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this will be supported out-of-the box across schema enabled Lakehouses and non-schema enabled Lakehouses in the future.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2024 19:06:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/cannot-write-to-lakehouse-with-schema-enabled-3-part-naming/m-p/4280405#M5142</guid>
      <dc:creator>frithjof_v</dc:creator>
      <dc:date>2024-11-12T19:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: cannot write to lakehouse with schema enabled 3 part naming</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/cannot-write-to-lakehouse-with-schema-enabled-3-part-naming/m-p/4281329#M5153</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/582570"&gt;@kely&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My testing result is somewhat different. When I attach a schema-enabled lakehouse to the notebook and use &lt;STRONG&gt;saveAsTable&lt;/STRONG&gt; function to save a dataframe to the default lakehouse, it works fine with both&amp;nbsp;3 part naming and 2 part naming.&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vjingzhanmsft_0-1731482467528.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1198775i155C4CCF890EA7D3/image-size/large?v=v2&amp;amp;px=999" role="button" title="vjingzhanmsft_0-1731482467528.png" alt="vjingzhanmsft_0-1731482467528.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;However when the destination&amp;nbsp;schema-enabled lakehouse is not attached as the default lakehouse of the notebook, it failed with an error "&lt;SPAN class=""&gt;AnalysisException&lt;SPAN&gt;: Couldn't find a catalog to handle the identifier LHschema.raw.newTableOne."&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It seems when using &lt;STRONG&gt;saveAsTable&lt;/STRONG&gt;, it always tries to look for the schema and table in the default lakehouse. With 3 part naming, saveAsTable treats the first part as a schema within the default lakehouse. However actually it should be the name of another lakehouse. This leads to the failure.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Jing&lt;BR /&gt;Community Support Team&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2024 08:08:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/cannot-write-to-lakehouse-with-schema-enabled-3-part-naming/m-p/4281329#M5153</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-13T08:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: cannot write to lakehouse with schema enabled 3 part naming</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/cannot-write-to-lakehouse-with-schema-enabled-3-part-naming/m-p/4282131#M5168</link>
      <description>&lt;P&gt;thx&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if I am in a notebook connected to a 'bronze' lakehouse, and I am writing to a 'gold' lakehouse that is schema enabled... is this not a valid use case?&amp;nbsp;&lt;/P&gt;&lt;P&gt;i.e.&amp;nbsp; When I write my gold table i would use goldlakehouse.schema.table?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2024 15:51:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/cannot-write-to-lakehouse-with-schema-enabled-3-part-naming/m-p/4282131#M5168</guid>
      <dc:creator>kely</dc:creator>
      <dc:date>2024-11-13T15:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: cannot write to lakehouse with schema enabled 3 part naming</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/cannot-write-to-lakehouse-with-schema-enabled-3-part-naming/m-p/4283231#M5177</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/582570"&gt;@kely&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My previous reply is based on my testing results, without any documentation supporting. So I'm not sure whether it's expected behavior, or it's a limitation, or it might be improved in the future.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your notebook is currently using a 'bronze' lakehouse as the default lakehouse,&amp;nbsp;&lt;SPAN&gt;using&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;saveAsTable&lt;/STRONG&gt;&amp;nbsp;with '&lt;SPAN&gt;goldlakehouse.schema.table&lt;/SPAN&gt;' is probably not valid. Usually switching the default lakehouse of a running notebook will need to terminate the session first. If I understand it correctly, one session can have only one default lakehouse. So at least one lakehouse needs to use the ABFS path in the notebook.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As of now, I recommend using &lt;STRONG&gt;ABFS&lt;/STRONG&gt; paths and &lt;STRONG&gt;save&lt;/STRONG&gt; function to write the dataframe in your case. This is more reliable.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Jing&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 06:58:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/cannot-write-to-lakehouse-with-schema-enabled-3-part-naming/m-p/4283231#M5177</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-14T06:58:55Z</dc:date>
    </item>
  </channel>
</rss>

