<?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 Error occurs on create materialized view with spark.sql in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/error-occurs-on-create-materialized-view-with-spark-sql/m-p/134848#M50211</link>
    <description>&lt;P&gt;When creating materialized view with spark.sql function it returns following error message.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;A class="" href="https://docs.databricks.com/error-messages/materialized-view-operation-not-allowed-error-class.html#mv_not_enabled" target="_blank" rel="noopener noreferrer"&gt;MATERIALIZED_VIEW_OPERATION_NOT_ALLOWED.MV_NOT_ENABLED&lt;/A&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;SPAN&gt; The materialized view operation CREATE is not allowed: Materialized view features are not enabled for your workspace. Please reach out to Databricks to enable materialized views for your workspace. SQLSTATE: 56038&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;But I can create materialized view with sql editor, I have create materialized view permission on target catalog and schema.&lt;/P&gt;&lt;P&gt;Is this a known issue with spark.sql ?&lt;/P&gt;</description>
    <pubDate>Tue, 14 Oct 2025 11:35:01 GMT</pubDate>
    <dc:creator>donlxz</dc:creator>
    <dc:date>2025-10-14T11:35:01Z</dc:date>
    <item>
      <title>Error occurs on create materialized view with spark.sql</title>
      <link>https://community.databricks.com/t5/data-engineering/error-occurs-on-create-materialized-view-with-spark-sql/m-p/134848#M50211</link>
      <description>&lt;P&gt;When creating materialized view with spark.sql function it returns following error message.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;A class="" href="https://docs.databricks.com/error-messages/materialized-view-operation-not-allowed-error-class.html#mv_not_enabled" target="_blank" rel="noopener noreferrer"&gt;MATERIALIZED_VIEW_OPERATION_NOT_ALLOWED.MV_NOT_ENABLED&lt;/A&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;SPAN&gt; The materialized view operation CREATE is not allowed: Materialized view features are not enabled for your workspace. Please reach out to Databricks to enable materialized views for your workspace. SQLSTATE: 56038&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;But I can create materialized view with sql editor, I have create materialized view permission on target catalog and schema.&lt;/P&gt;&lt;P&gt;Is this a known issue with spark.sql ?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Oct 2025 11:35:01 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/error-occurs-on-create-materialized-view-with-spark-sql/m-p/134848#M50211</guid>
      <dc:creator>donlxz</dc:creator>
      <dc:date>2025-10-14T11:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: Error occurs on create materialized view with spark.sql</title>
      <link>https://community.databricks.com/t5/data-engineering/error-occurs-on-create-materialized-view-with-spark-sql/m-p/134864#M50214</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/176316"&gt;@donlxz&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;When you look at documentation, they only available way to create materialized view is by executing CREATE MATERIALIZED VIEW statement. You can submit that statement via SQL editor, Azure Databricks UI, Databricsk CLI or Databricks SQL API.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="szymon_dybczak_0-1760449975337.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/20715iDB76A62EE01B9379/image-size/medium?v=v2&amp;amp;px=400" role="button" title="szymon_dybczak_0-1760449975337.png" alt="szymon_dybczak_0-1760449975337.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/ldp/dbsql/materialized#create-a-materialized-view" target="_blank" rel="noopener"&gt;Use materialized views in Databricks SQL - Azure Databricks | Microsoft Learn&lt;/A&gt;&lt;/P&gt;&lt;P&gt;So, you can't create materialized view wiht spark.sql approach.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Oct 2025 13:54:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/error-occurs-on-create-materialized-view-with-spark-sql/m-p/134864#M50214</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2025-10-14T13:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: Error occurs on create materialized view with spark.sql</title>
      <link>https://community.databricks.com/t5/data-engineering/error-occurs-on-create-materialized-view-with-spark-sql/m-p/134943#M50234</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/110502"&gt;@szymon_dybczak&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you for your response.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You're right, it was mentioned in the documentation—I missed it when checking.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I understand now that it's not possible to do this with spark.sql. Thanks for clarifying!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Oct 2025 02:12:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/error-occurs-on-create-materialized-view-with-spark-sql/m-p/134943#M50234</guid>
      <dc:creator>donlxz</dc:creator>
      <dc:date>2025-10-15T02:12:07Z</dc:date>
    </item>
  </channel>
</rss>

