<?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 to materialize a view from SQL endpoint as delta table consumable directly from DirectLake? in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/How-to-materialize-a-view-from-SQL-endpoint-as-delta-table/m-p/4878444#M63837</link>
    <description>&lt;P&gt;Hi jaryszek,&lt;BR /&gt;&lt;BR /&gt;Thank you for your inquiry on the Microsoft Fabric Community Forum.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Based on my understanding, the error "TABLE_OR_VIEW_NOT_FOUND: Mart2.Dim_Group_Descendant" occurs because SQL Analytics Endpoint views are not directly visible to Spark. The view exists only in the SQL Endpoint catalog, while&amp;nbsp;spark.sql() queries the Spark catalog. Therefore, Spark cannot resolve the view name.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;To make the view available in the Lakehouse so that Power BI (Direct Lake) can use it, we must read the SQL view using the Fabric Spark SQL connector (synapsesql) and then write it as a Delta table.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Please follow the steps below, which might help to resolve the issue:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;Read the SQL view in the notebook using:&lt;BR /&gt;df = spark.read.synapsesql("dw3_1.Mart2.Dim_Group_Descendant")&lt;BR /&gt;display(df.limit(20))&lt;/P&gt;
&lt;P&gt;Replace&amp;nbsp;dw3_1,&amp;nbsp;Mart2, and&amp;nbsp;Dim_Group_Descendant with your actual warehouse (or lakehouse) and schema names.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Materialise the data into a Lakehouse Delta table using:&lt;BR /&gt;df.write.format("delta").mode("overwrite").saveAsTable("Mart2.Dim_Group_Descendant_Materialized")&lt;/P&gt;
&lt;P&gt;This creates a physical Delta table in the Lakehouse.&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;For further information, please refer to the links provided:&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-gb/fabric/data-engineering/spark-data-warehouse-connector?tabs=pyspark" target="_blank"&gt;Spark connector for Microsoft Fabric Data Warehouse - Microsoft Fabric | Microsoft Learn&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-gb/fabric/data-engineering/lakehouse-and-delta-tables" target="_blank"&gt;Lakehouse and Delta Tables - Microsoft Fabric | Microsoft Learn&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-gb/fabric/fundamentals/direct-lake-overview" target="_blank"&gt;Direct Lake overview - Microsoft Fabric | Microsoft Learn&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;We hope the information helps to resolve the issue. If you have any further queries, please feel free to contact the Microsoft Fabric community.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Tue, 18 Nov 2025 09:54:53 GMT</pubDate>
    <dc:creator>v-pnaroju-msft</dc:creator>
    <dc:date>2025-11-18T09:54:53Z</dc:date>
    <item>
      <title>How to materialize a view from SQL endpoint as delta table consumable directly from DirectLake?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-materialize-a-view-from-SQL-endpoint-as-delta-table/m-p/4877448#M63823</link>
      <description>&lt;P&gt;Hello Guys,&lt;BR /&gt;&lt;BR /&gt;I created a view (&lt;STRONG&gt;Materialized Views are not supported for me yet&lt;/STRONG&gt;) in sql endpoint on LakeHouse.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;View is working using this query:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jaryszek_0-1763380382377.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1310483i2400948EAA9146C8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jaryszek_0-1763380382377.png" alt="jaryszek_0-1763380382377.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Now I want to use notebook to create delta table from it and put it into LakeHouse layer, not sql endpoint view. In other words I want to materialize view to be used by power bi.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I tried with:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jaryszek_1-1763380437643.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1310484iE5DDE49B4CCEFA85/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jaryszek_1-1763380437643.png" alt="jaryszek_1-1763380437643.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;but getting error:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;AnalysisException: [TABLE_OR_VIEW_NOT_FOUND] The table or view `Mart2`.`Dim_Group_Descendant` cannot be found. Verify the spelling and correctness of the schema and catalog.
If you did not qualify the name with a schema, verify the current_schema() output, or qualify the name with the correct schema and catalog.
To tolerate the error on drop use DROP VIEW IF EXISTS or DROP TABLE IF EXISTS.; line 6 pos 5;
'Project ['GroupSK, 'GroupName, 'CategoryName]
+- 'UnresolvedRelation [Mart2, Dim_Group_Descendant], [], false&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;How to solve it?&lt;BR /&gt;&lt;BR /&gt;Best,&lt;BR /&gt;Jacek&lt;/P&gt;</description>
      <pubDate>Mon, 17 Nov 2025 11:54:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-materialize-a-view-from-SQL-endpoint-as-delta-table/m-p/4877448#M63823</guid>
      <dc:creator>jaryszek</dc:creator>
      <dc:date>2025-11-17T11:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to materialize a view from SQL endpoint as delta table consumable directly from DirectLake?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-materialize-a-view-from-SQL-endpoint-as-delta-table/m-p/4878444#M63837</link>
      <description>&lt;P&gt;Hi jaryszek,&lt;BR /&gt;&lt;BR /&gt;Thank you for your inquiry on the Microsoft Fabric Community Forum.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Based on my understanding, the error "TABLE_OR_VIEW_NOT_FOUND: Mart2.Dim_Group_Descendant" occurs because SQL Analytics Endpoint views are not directly visible to Spark. The view exists only in the SQL Endpoint catalog, while&amp;nbsp;spark.sql() queries the Spark catalog. Therefore, Spark cannot resolve the view name.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;To make the view available in the Lakehouse so that Power BI (Direct Lake) can use it, we must read the SQL view using the Fabric Spark SQL connector (synapsesql) and then write it as a Delta table.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Please follow the steps below, which might help to resolve the issue:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;Read the SQL view in the notebook using:&lt;BR /&gt;df = spark.read.synapsesql("dw3_1.Mart2.Dim_Group_Descendant")&lt;BR /&gt;display(df.limit(20))&lt;/P&gt;
&lt;P&gt;Replace&amp;nbsp;dw3_1,&amp;nbsp;Mart2, and&amp;nbsp;Dim_Group_Descendant with your actual warehouse (or lakehouse) and schema names.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Materialise the data into a Lakehouse Delta table using:&lt;BR /&gt;df.write.format("delta").mode("overwrite").saveAsTable("Mart2.Dim_Group_Descendant_Materialized")&lt;/P&gt;
&lt;P&gt;This creates a physical Delta table in the Lakehouse.&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;For further information, please refer to the links provided:&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-gb/fabric/data-engineering/spark-data-warehouse-connector?tabs=pyspark" target="_blank"&gt;Spark connector for Microsoft Fabric Data Warehouse - Microsoft Fabric | Microsoft Learn&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-gb/fabric/data-engineering/lakehouse-and-delta-tables" target="_blank"&gt;Lakehouse and Delta Tables - Microsoft Fabric | Microsoft Learn&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-gb/fabric/fundamentals/direct-lake-overview" target="_blank"&gt;Direct Lake overview - Microsoft Fabric | Microsoft Learn&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;We hope the information helps to resolve the issue. If you have any further queries, please feel free to contact the Microsoft Fabric community.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Nov 2025 09:54:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-materialize-a-view-from-SQL-endpoint-as-delta-table/m-p/4878444#M63837</guid>
      <dc:creator>v-pnaroju-msft</dc:creator>
      <dc:date>2025-11-18T09:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to materialize a view from SQL endpoint as delta table consumable directly from DirectLake?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-materialize-a-view-from-SQL-endpoint-as-delta-table/m-p/4879603#M63844</link>
      <description>&lt;P&gt;Thank you,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Jacek&lt;/P&gt;</description>
      <pubDate>Wed, 19 Nov 2025 10:27:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-materialize-a-view-from-SQL-endpoint-as-delta-table/m-p/4879603#M63844</guid>
      <dc:creator>jaryszek</dc:creator>
      <dc:date>2025-11-19T10:27:14Z</dc:date>
    </item>
  </channel>
</rss>

