<?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: Error when writing data into schema enabled lakehouse using notebooks in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-when-writing-data-into-schema-enabled-lakehouse-using/m-p/4116521#M3754</link>
    <description>&lt;P&gt;&lt;STRONG&gt;Resolution: &lt;/STRONG&gt;The issue is caused by the use of internal APIs. In some cases, the internal APIs are returning a 403 when routed to a datacenter where the user is not present. The fix is to move to the public APIs. The code is already in there, but we need to provide the switch from the workload code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%%pyspark&lt;/P&gt;&lt;P&gt;!echo "spark.trident.pbiApiVersion=v1"&amp;gt;&amp;gt;/home/trusted-service-user/.trident-context&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;The fix would be deployed within 3 to 4 weeks in all production regions.&lt;BR /&gt;&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 23 Aug 2024 22:52:25 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-08-23T22:52:25Z</dc:date>
    <item>
      <title>Error when writing data into schema enabled lakehouse using notebooks</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-when-writing-data-into-schema-enabled-lakehouse-using/m-p/4111069#M3708</link>
      <description>&lt;P&gt;I was try using PySpark and SparkSQL to write/create data/table into my lakehouse and it gave me an error. I was try using both &lt;STRONG&gt;&lt;EM&gt;.save&lt;/EM&gt;&lt;/STRONG&gt; and &lt;STRONG&gt;&lt;EM&gt;.saveAsTable&lt;/EM&gt;&lt;/STRONG&gt; options, but it didn't work. When I was using .save, it gave me a&amp;nbsp;&lt;STRONG&gt;&lt;SPAN class=""&gt;bad request error&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt;&amp;nbsp;and .saveAsTable gave me a&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;forbidden error&lt;/STRONG&gt;. This was when I created the lakehouse with &lt;STRONG&gt;schema enabled&lt;/STRONG&gt;.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;But, when I created the lakehouse without enabling schema it didn't gave me any error, just run successfully and created the table.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;What is the issue exactly? Is it with permission or? Please help me out here.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;TIA.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2024 11:16:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-when-writing-data-into-schema-enabled-lakehouse-using/m-p/4111069#M3708</guid>
      <dc:creator>pavarayaaa</dc:creator>
      <dc:date>2024-08-21T11:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: Error when writing data into schema enabled lakehouse using notebooks</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-when-writing-data-into-schema-enabled-lakehouse-using/m-p/4112770#M3715</link>
      <description>&lt;P&gt;I can reproduce your errors. Looks like a bug to me, as Microsoft described in Fabric documentation it should be possible to create new tables using saveAsTable (&lt;A href="https://learn.microsoft.com/en-us/fabric/data-engineering/lakehouse-schemas#store-tables-in-lakehouse-schemas" target="_blank"&gt;Lakehouse schemas (Preview) - Microsoft Fabric | Microsoft Learn&lt;/A&gt;). Consider reporting it as a bug to Microsoft.&lt;BR /&gt;&lt;BR /&gt;Also, keep in mind that lakehouse schemas are currently in public preview having tons of limitations (&lt;A href="https://learn.microsoft.com/en-us/fabric/data-engineering/lakehouse-schemas#public-preview-limitations" target="_blank"&gt;Lakehouse schemas (Preview) - Microsoft Fabric | Microsoft Learn&lt;/A&gt;).&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;/P&gt;&lt;P&gt;Pawel&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2024 06:30:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-when-writing-data-into-schema-enabled-lakehouse-using/m-p/4112770#M3715</guid>
      <dc:creator>pawelpo</dc:creator>
      <dc:date>2024-08-22T06:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: Error when writing data into schema enabled lakehouse using notebooks</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-when-writing-data-into-schema-enabled-lakehouse-using/m-p/4112897#M3716</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/787512"&gt;@pavarayaaa&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the reply from&amp;nbsp;pawelpo&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When schema validation is enabled, the system may apply more stringent checks to the data being written. Ensure that the data conforms to the schema.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I created a lakehouse with preview schema enabled and did a lot of testing and found that I get an error when using the following statement “saveAsTable”:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;AnalysisException: Found invalid character(s) among ' ,;{}()\n\t=' in the column names of your schema. &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vhuijieymsft_0-1724310995743.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1155311i384C59516E7D068C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vhuijieymsft_0-1724310995743.png" alt="vhuijieymsft_0-1724310995743.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;Using this statement works fine: &lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;df = spark.read.format(“csv”).option(“header”, “false”).load(“Files/2019.csv”)

# Create a new table
df.write.format(“delta”).saveAsTable(“test2”)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vhuijieymsft_1-1724310995748.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1155310iB460DC6C7D8D878B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vhuijieymsft_1-1724310995748.png" alt="vhuijieymsft_1-1724310995748.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have any other questions please feel free to contact me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Yang&lt;BR /&gt;Community Support Team&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there is any post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;to help the other members find it more quickly.&lt;BR /&gt;If I misunderstand your needs or you still have problems on it, please feel free to let us know.&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Thanks a lot!&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2024 07:21:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-when-writing-data-into-schema-enabled-lakehouse-using/m-p/4112897#M3716</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-22T07:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: Error when writing data into schema enabled lakehouse using notebooks</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-when-writing-data-into-schema-enabled-lakehouse-using/m-p/4115740#M3746</link>
      <description>&lt;P&gt;This is a bug, they have not resolved it yet.&lt;BR /&gt;Check this:&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/Data-Engineering/An-error-occurred-while-calling-o321-sql/m-p/4091311" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Data-Engineering/An-error-occurred-while-calling-o321-sql/m-p/4091311&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is similar to your problem. We had to redo our work, re-create lakehouses without schema enabled.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 12:48:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-when-writing-data-into-schema-enabled-lakehouse-using/m-p/4115740#M3746</guid>
      <dc:creator>arlindTrystar</dc:creator>
      <dc:date>2024-08-23T12:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: Error when writing data into schema enabled lakehouse using notebooks</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-when-writing-data-into-schema-enabled-lakehouse-using/m-p/4116521#M3754</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Resolution: &lt;/STRONG&gt;The issue is caused by the use of internal APIs. In some cases, the internal APIs are returning a 403 when routed to a datacenter where the user is not present. The fix is to move to the public APIs. The code is already in there, but we need to provide the switch from the workload code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%%pyspark&lt;/P&gt;&lt;P&gt;!echo "spark.trident.pbiApiVersion=v1"&amp;gt;&amp;gt;/home/trusted-service-user/.trident-context&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;The fix would be deployed within 3 to 4 weeks in all production regions.&lt;BR /&gt;&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 22:52:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-when-writing-data-into-schema-enabled-lakehouse-using/m-p/4116521#M3754</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-23T22:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: Error when writing data into schema enabled lakehouse using notebooks</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-when-writing-data-into-schema-enabled-lakehouse-using/m-p/4117502#M3764</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/787512"&gt;@pavarayaaa&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the reply from&amp;nbsp;v-ayaanali&amp;nbsp;/&amp;nbsp;arlindTrystar.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is my follow-up just to ask if the problem has been solved?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I and some users have provided workaround, if it works for you could you accept that answer as a solution to help other members find it faster?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much for your cooperation!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Yang&lt;BR /&gt;Community Support Team&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there is any post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;to help the other members find it more quickly.&lt;BR /&gt;If I misunderstand your needs or you still have problems on it, please feel free to let us know.&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Thanks a lot!&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2024 01:14:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-when-writing-data-into-schema-enabled-lakehouse-using/m-p/4117502#M3764</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-26T01:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: Error when writing data into schema enabled lakehouse using notebooks</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-when-writing-data-into-schema-enabled-lakehouse-using/m-p/4118041#M3770</link>
      <description>&lt;P&gt;This does not address the problem. Because the user is getting &lt;STRONG&gt;bad request&lt;/STRONG&gt; error and &lt;STRONG&gt;forbidden&lt;/STRONG&gt; error, not &lt;STRONG&gt;AnalysisException&lt;/STRONG&gt; error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2024 07:20:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-when-writing-data-into-schema-enabled-lakehouse-using/m-p/4118041#M3770</guid>
      <dc:creator>arlindTrystar</dc:creator>
      <dc:date>2024-08-26T07:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: Error when writing data into schema enabled lakehouse using notebooks</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-when-writing-data-into-schema-enabled-lakehouse-using/m-p/4119580#M3779</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/787512"&gt;@pavarayaaa&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the reply from arlindTrystar&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If none of the workaround we provided works, perhaps creating lakehouse without schema enabled is your last option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Yang&lt;BR /&gt;Community Support Team&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there is any post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;to help the other members find it more quickly.&lt;BR /&gt;If I misunderstand your needs or you still have problems on it, please feel free to let us know.&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Thanks a lot!&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2024 01:18:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-when-writing-data-into-schema-enabled-lakehouse-using/m-p/4119580#M3779</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-27T01:18:08Z</dc:date>
    </item>
  </channel>
</rss>

