<?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: Lakehouse with Schema Bug - Not generating proper metadata in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Lakehouse-with-Schema-Bug-Not-generating-proper-metadata/m-p/4364850#M6106</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="615340" data-lia-user-login="MattSB" class="lia-mention lia-mention-user"&gt;MattSB&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Jan 2025 10:14:00 GMT</pubDate>
    <dc:creator>v-nmadadi-msft</dc:creator>
    <dc:date>2025-01-15T10:14:00Z</dc:date>
    <item>
      <title>Lakehouse with Schema Bug - Not generating proper metadata</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Lakehouse-with-Schema-Bug-Not-generating-proper-metadata/m-p/4347101#M5831</link>
      <description>&lt;P&gt;HI ive ran into a problem while testing the Lakehouse with schema. The issue appears that the creation of the deltatable is not populating the standard meta data correctly&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Issue&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;- lakehouse called 'bronze' with a&amp;nbsp;schema called `rdm`.&lt;/P&gt;&lt;P&gt;- Notebook requesting data from gov.uk API adding to a datframe and loading to a delta table.&lt;/P&gt;&lt;P&gt;- Issues identified&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;In the properties pane Format is not&amp;nbsp; populated.&lt;BR /&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;Running `spark&lt;SPAN&gt;.catalog.listTables()` returns an empty list&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;Running `&lt;/SPAN&gt;&lt;/SPAN&gt;spark&lt;SPAN&gt;.sql("&lt;/SPAN&gt;&lt;SPAN&gt;show&lt;/SPAN&gt; &lt;SPAN&gt;tables&lt;/SPAN&gt;&lt;SPAN&gt;")` returns an empty data frame&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;Running `DESCRIBE DETAIL rdm.bank_holidays_eng` returns an odd name but is returning the format of delta&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;img /&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Running&amp;nbsp;&lt;SPAN&gt;DESCRIBE&lt;/SPAN&gt; &lt;SPAN&gt;DETAIL&lt;/SPAN&gt; &lt;SPAN&gt;delta&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;`Tables/rdm/bank_holidays_eng` returns NULL for name&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;STRONG&gt;Test Scenario&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;- &lt;/STRONG&gt;Notebook loading&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# load the requests library
import requests

# define the url
url = "https://www.gov.uk/bank-holidays/england-and-wales.json"

# make a GET request 
response = requests.get(url)

# Process the response json 
response_data = response.json()

## Create the data frame ##

# Load modules
from pyspark.sql.types import StructType, StructField, StringType, DateType
from datetime import datetime

# Convert date strings to date objects, handling blank strings
def convert_date(date_str):
    return datetime.strptime(date_str, '%Y-%m-%d').date() if date_str else None

# Extract the list of results
parsed_data = [(item['title'], convert_date(item['date'])) for item in response_data['events']]

# Define the schema
schema = StructType([
    StructField("holiday", StringType(), True, {"comment": "Name of holiday"}),
    StructField("date", DateType(), True, {"comment": "Date of holiday"})
])

# Create DataFrame 
df = spark.createDataFrame(parsed_data , schema )

# Order the results
df = df.orderBy(df["date"].asc())

# Show the dataframe
df.show()

## Store data in delta table ##

delta_table_path = "bronze.rdm.bank_holidays_eng" 
#also tried using the table path and same behaviour "Tables/rdm/bank_holidays_eng"

# Write the DataFrame to a Delta table
df.write.format("delta").mode("overwrite").saveAsTable(delta_table_path)&lt;/LI-CODE&gt;&lt;P&gt;Any advice would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Dec 2024 09:10:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Lakehouse-with-Schema-Bug-Not-generating-proper-metadata/m-p/4347101#M5831</guid>
      <dc:creator>MattSB</dc:creator>
      <dc:date>2024-12-31T09:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: Lakehouse with Schema Bug - Not generating proper metadata</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Lakehouse-with-Schema-Bug-Not-generating-proper-metadata/m-p/4347314#M5837</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="615340" data-lia-user-login="MattSB" class="lia-mention lia-mention-user"&gt;MattSB&lt;/a&gt;&amp;nbsp; ,&lt;BR /&gt;Thanks for reaching out to the Microsoft fabric community forum.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Currently as the lakehouse schemas is still in public preview some of the features are not yet supported. One of them is adding a delta table in our desired schema. Currently we can load df into the default schema.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;But we can then move the delta table to the schema we want.&lt;/P&gt;
&lt;P&gt;Once the delta table is created in default schema we can just drag and drop it from default schema to the one we want&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Alterantively you can also use DDL commands (Alter tables) in SQL endpoint to move the delta table&lt;BR /&gt;&lt;BR /&gt;Did I answer your question? Mark my post as a solution, this will help others!&lt;/P&gt;
&lt;P&gt;If my response(s) assisted you in any way, don't forget to give "Kudos"&lt;BR /&gt;&lt;BR /&gt;Thanks and Regards&lt;/P&gt;</description>
      <pubDate>Tue, 31 Dec 2024 14:37:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Lakehouse-with-Schema-Bug-Not-generating-proper-metadata/m-p/4347314#M5837</guid>
      <dc:creator>v-nmadadi-msft</dc:creator>
      <dc:date>2024-12-31T14:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Lakehouse with Schema Bug - Not generating proper metadata</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Lakehouse-with-Schema-Bug-Not-generating-proper-metadata/m-p/4347320#M5838</link>
      <description>&lt;P&gt;HI nithin,&lt;/P&gt;&lt;P&gt;Thanks for confirming, i was sort of hoping after 4 months in preview the schema functionality would be closer to production by now.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you confirm if I use your suggested process will appends and overwrites work still?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Dec 2024 14:57:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Lakehouse-with-Schema-Bug-Not-generating-proper-metadata/m-p/4347320#M5838</guid>
      <dc:creator>MattSB</dc:creator>
      <dc:date>2024-12-31T14:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: Lakehouse with Schema Bug - Not generating proper metadata</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Lakehouse-with-Schema-Bug-Not-generating-proper-metadata/m-p/4347780#M5844</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="615340" data-lia-user-login="MattSB" class="lia-mention lia-mention-user"&gt;MattSB&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;you can still append or overwrite to the table in your default schema and then drag and drop the table to a different schema.&lt;/P&gt;
&lt;P&gt;But if you&amp;nbsp; are trying to append or overwrite to a table in different schema using SQL endpoint( or Spark SQL) would be the better option.&lt;BR /&gt;Thanks and regards&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jan 2025 17:05:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Lakehouse-with-Schema-Bug-Not-generating-proper-metadata/m-p/4347780#M5844</guid>
      <dc:creator>v-nmadadi-msft</dc:creator>
      <dc:date>2025-01-01T17:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: Lakehouse with Schema Bug - Not generating proper metadata</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Lakehouse-with-Schema-Bug-Not-generating-proper-metadata/m-p/4351323#M5907</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="615340" data-lia-user-login="MattSB" class="lia-mention lia-mention-user"&gt;MattSB&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2025 04:54:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Lakehouse-with-Schema-Bug-Not-generating-proper-metadata/m-p/4351323#M5907</guid>
      <dc:creator>v-nmadadi-msft</dc:creator>
      <dc:date>2025-01-06T04:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: Lakehouse with Schema Bug - Not generating proper metadata</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Lakehouse-with-Schema-Bug-Not-generating-proper-metadata/m-p/4364850#M6106</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="615340" data-lia-user-login="MattSB" class="lia-mention lia-mention-user"&gt;MattSB&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jan 2025 10:14:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Lakehouse-with-Schema-Bug-Not-generating-proper-metadata/m-p/4364850#M6106</guid>
      <dc:creator>v-nmadadi-msft</dc:creator>
      <dc:date>2025-01-15T10:14:00Z</dc:date>
    </item>
    <item>
      <title>Re: Lakehouse with Schema Bug - Not generating proper metadata</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Lakehouse-with-Schema-Bug-Not-generating-proper-metadata/m-p/4368530#M6174</link>
      <description>&lt;P&gt;&lt;SPAN data-teams="true"&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="615340" data-lia-user-login="MattSB" class="lia-mention lia-mention-user"&gt;MattSB&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;I wanted to confirm if the solution provided was helpful and resolved your concerns. If you have any further questions or issues, please feel free to reach out to us, also i&lt;SPAN&gt;f this post&amp;nbsp;helps, then please give us Kudos and consider&amp;nbsp;Accept it as a solution&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-teams="true"&gt;&lt;BR /&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2025 05:01:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Lakehouse-with-Schema-Bug-Not-generating-proper-metadata/m-p/4368530#M6174</guid>
      <dc:creator>v-nmadadi-msft</dc:creator>
      <dc:date>2025-01-22T05:01:04Z</dc:date>
    </item>
  </channel>
</rss>

