<?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: How does merge schema work in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-does-merge-schema-work/m-p/24270#M16869</link>
    <description>&lt;P&gt;Are you saving to delta file location?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you append to location, it will not update the hive metastore table as it only updates underlying files. You can use saveAsTable, or you need to refresh the metastore table using the SQL command:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REFRESH TABLE tableName;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 30 Mar 2022 16:30:07 GMT</pubDate>
    <dc:creator>Hubert-Dudek</dc:creator>
    <dc:date>2022-03-30T16:30:07Z</dc:date>
    <item>
      <title>How does merge schema work</title>
      <link>https://community.databricks.com/t5/data-engineering/how-does-merge-schema-work/m-p/24269#M16868</link>
      <description>&lt;P&gt;Let's say I create a table like &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CREATE TABLE IF NOT EXISTS new_db.data_table (
  key	STRING,
  value	STRING,
  last_updated_time	TIMESTAMP
) USING DELTA LOCATION 's3://......';&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now when I insert into this table I insert data which has say 20 columns and do merge schema while insertion. &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;.option("mergeSchema", "true")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;So when I display the data it shows me all 20 columns, but now when I look at the table schema through the data tab it still shows only the initial 3 rows i.e. the catalog is not updated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wanted to understand how does this work? &lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 16:19:56 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-does-merge-schema-work/m-p/24269#M16868</guid>
      <dc:creator>Constantine</dc:creator>
      <dc:date>2022-03-30T16:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: How does merge schema work</title>
      <link>https://community.databricks.com/t5/data-engineering/how-does-merge-schema-work/m-p/24270#M16869</link>
      <description>&lt;P&gt;Are you saving to delta file location?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you append to location, it will not update the hive metastore table as it only updates underlying files. You can use saveAsTable, or you need to refresh the metastore table using the SQL command:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REFRESH TABLE tableName;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 16:30:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-does-merge-schema-work/m-p/24270#M16869</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2022-03-30T16:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: How does merge schema work</title>
      <link>https://community.databricks.com/t5/data-engineering/how-does-merge-schema-work/m-p/37399#M26343</link>
      <description>&lt;P&gt;I tried running "REFRESH TABLE tablename;" but I still do not see the added columns in the data explorer columns, while I do see the added columns in the sample data&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2023 19:51:24 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-does-merge-schema-work/m-p/37399#M26343</guid>
      <dc:creator>timdriscoll22</dc:creator>
      <dc:date>2023-07-11T19:51:24Z</dc:date>
    </item>
  </channel>
</rss>

