<?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 Cannot run merge statement in the notebook in Get Started Discussions</title>
    <link>https://community.databricks.com/t5/get-started-discussions/cannot-run-merge-statement-in-the-notebook/m-p/120997#M10149</link>
    <description>&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;I'm trialing Databricks for running complex python integration scripts. It will be different data sources (MS SQL, CSV files etc.) that I need to push to a target system via GraphQL. So I selected Databricks vs MS Fabric as it can handle complex Python scripting with lots of utility files.&lt;/P&gt;&lt;P&gt;With that in mind, I created tables and transformations, but in one case I ran into a problem that I'm unable to solve.&lt;/P&gt;&lt;P&gt;I have an SQL cell, that runs successfully on serverless starter warehouse but fails with error on serverless compute. I've simplified the script to still reproduce the issue:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dimitry_0-1749101790855.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/17355iF95A829FCABC0C99/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dimitry_0-1749101790855.png" alt="Dimitry_0-1749101790855.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The error is:&amp;nbsp;[UNRESOLVED_COLUMN.WITHOUT_SUGGESTION] A column, variable, or function parameter with name `_metadata` cannot be resolved. SQLSTATE: 42703&lt;/P&gt;&lt;P&gt;I found this because of the enableRowTracking on the table.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dimitry_1-1749101815839.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/17356i9A8B17DCCE21C8AF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dimitry_1-1749101815839.png" alt="Dimitry_1-1749101815839.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The script works just fine via SQL starter warehouse.&lt;/P&gt;&lt;P&gt;Please help me to find what needs to be setup for this to work.&lt;/P&gt;</description>
    <pubDate>Thu, 05 Jun 2025 05:38:53 GMT</pubDate>
    <dc:creator>Dimitry</dc:creator>
    <dc:date>2025-06-05T05:38:53Z</dc:date>
    <item>
      <title>Cannot run merge statement in the notebook</title>
      <link>https://community.databricks.com/t5/get-started-discussions/cannot-run-merge-statement-in-the-notebook/m-p/120997#M10149</link>
      <description>&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;I'm trialing Databricks for running complex python integration scripts. It will be different data sources (MS SQL, CSV files etc.) that I need to push to a target system via GraphQL. So I selected Databricks vs MS Fabric as it can handle complex Python scripting with lots of utility files.&lt;/P&gt;&lt;P&gt;With that in mind, I created tables and transformations, but in one case I ran into a problem that I'm unable to solve.&lt;/P&gt;&lt;P&gt;I have an SQL cell, that runs successfully on serverless starter warehouse but fails with error on serverless compute. I've simplified the script to still reproduce the issue:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dimitry_0-1749101790855.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/17355iF95A829FCABC0C99/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dimitry_0-1749101790855.png" alt="Dimitry_0-1749101790855.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The error is:&amp;nbsp;[UNRESOLVED_COLUMN.WITHOUT_SUGGESTION] A column, variable, or function parameter with name `_metadata` cannot be resolved. SQLSTATE: 42703&lt;/P&gt;&lt;P&gt;I found this because of the enableRowTracking on the table.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dimitry_1-1749101815839.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/17356i9A8B17DCCE21C8AF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dimitry_1-1749101815839.png" alt="Dimitry_1-1749101815839.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The script works just fine via SQL starter warehouse.&lt;/P&gt;&lt;P&gt;Please help me to find what needs to be setup for this to work.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 05:38:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/cannot-run-merge-statement-in-the-notebook/m-p/120997#M10149</guid>
      <dc:creator>Dimitry</dc:creator>
      <dc:date>2025-06-05T05:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot run merge statement in the notebook</title>
      <link>https://community.databricks.com/t5/get-started-discussions/cannot-run-merge-statement-in-the-notebook/m-p/121032#M10151</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/164556"&gt;@Dimitry&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;The issue you're seeing is due to delta.enableRowTracking = true. This feature adds hidden _metadata columns, which serverless compute doesn't support, that's why the MERGE fails there.&lt;/P&gt;&lt;P&gt;Try this out:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;You can disable row tracking with:&lt;BR /&gt;ALTER TABLE shopify.stock.location2&lt;BR /&gt;SET TBLPROPERTIES (delta.enableRowTracking = false);&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Alternatives:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Keep delta.enableChangeDataFeed = true, it works on both compute types.&lt;/LI&gt;&lt;LI&gt;Use a SQL warehouse (non-serverless) if you need row tracking for that operation.&lt;/LI&gt;&lt;LI&gt;Or, consider using Change Data Feed instead of row tracking for audit/logging needs.&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Thu, 05 Jun 2025 11:06:02 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/cannot-run-merge-statement-in-the-notebook/m-p/121032#M10151</guid>
      <dc:creator>SP_6721</dc:creator>
      <dc:date>2025-06-05T11:06:02Z</dc:date>
    </item>
  </channel>
</rss>

