<?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: Views in DLT with Private Preview  feature Direct Publish in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/views-in-dlt-with-private-preview-feature-direct-publish/m-p/107717#M42899</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/134556"&gt;@susanne&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Use Tables Instead of Views&lt;/STRONG&gt;: If possible, convert your views to tables.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;@dlt.table(
    name=target_table,
)
def get_gold_table():
    df = spark.sql(f"""{gold_selection}""")
    return df&lt;/LI-CODE&gt;
&lt;P&gt;&lt;STRONG data-stringify-type="bold"&gt;Direct Publish Feature&lt;/STRONG&gt;&lt;SPAN&gt;: The Direct Publish feature does not support publishing views to another schema. It is intended for tables and materialized views, which can be published to the catalog.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG data-stringify-type="bold"&gt;Solution&lt;/STRONG&gt;&lt;SPAN&gt;: To publish data to a different schema, consider using a table or materialized view instead of a view, as these can be written to the catalog.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 30 Jan 2025 07:59:07 GMT</pubDate>
    <dc:creator>Sidhant07</dc:creator>
    <dc:date>2025-01-30T07:59:07Z</dc:date>
    <item>
      <title>Views in DLT with Private Preview  feature Direct Publish</title>
      <link>https://community.databricks.com/t5/data-engineering/views-in-dlt-with-private-preview-feature-direct-publish/m-p/106905#M42632</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I am building a dlt Pipeline and there I am using the Direct Publish feature which is as of now still under Private Preview.&lt;BR /&gt;While it works well to create streaming tables and write them to another schema than the dlt&amp;nbsp; default schema, I get the following error message, when I try to create a View and write it to a different schema than the default schema:&lt;BR /&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;AnalysisException: View with multipart name 'gold.fact_customer' is not supported.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;I used the following code to create the View:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;@&lt;/SPAN&gt;&lt;SPAN&gt;dlt&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;table&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;name&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; target_table, &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;def&lt;/SPAN&gt; &lt;SPAN&gt;get_gold_table&lt;/SPAN&gt;&lt;SPAN&gt;():&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;df &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; spark&lt;/SPAN&gt;&lt;SPAN&gt;.sql&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;f&lt;/SPAN&gt;&lt;SPAN&gt;"""&lt;/SPAN&gt;&lt;SPAN&gt;{gold_selection}&lt;/SPAN&gt;&lt;SPAN&gt;"""&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return&lt;/SPAN&gt;&lt;SPAN&gt; df&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Does Direct Publish in general not support publishing of views to another schema?&lt;BR /&gt;Any help would be much appreciated.&lt;BR /&gt;Thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;Susanne&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 24 Jan 2025 12:59:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/views-in-dlt-with-private-preview-feature-direct-publish/m-p/106905#M42632</guid>
      <dc:creator>susanne</dc:creator>
      <dc:date>2025-01-24T12:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: Views in DLT with Private Preview  feature Direct Publish</title>
      <link>https://community.databricks.com/t5/data-engineering/views-in-dlt-with-private-preview-feature-direct-publish/m-p/107717#M42899</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/134556"&gt;@susanne&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Use Tables Instead of Views&lt;/STRONG&gt;: If possible, convert your views to tables.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;@dlt.table(
    name=target_table,
)
def get_gold_table():
    df = spark.sql(f"""{gold_selection}""")
    return df&lt;/LI-CODE&gt;
&lt;P&gt;&lt;STRONG data-stringify-type="bold"&gt;Direct Publish Feature&lt;/STRONG&gt;&lt;SPAN&gt;: The Direct Publish feature does not support publishing views to another schema. It is intended for tables and materialized views, which can be published to the catalog.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG data-stringify-type="bold"&gt;Solution&lt;/STRONG&gt;&lt;SPAN&gt;: To publish data to a different schema, consider using a table or materialized view instead of a view, as these can be written to the catalog.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2025 07:59:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/views-in-dlt-with-private-preview-feature-direct-publish/m-p/107717#M42899</guid>
      <dc:creator>Sidhant07</dc:creator>
      <dc:date>2025-01-30T07:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: Views in DLT with Private Preview  feature Direct Publish</title>
      <link>https://community.databricks.com/t5/data-engineering/views-in-dlt-with-private-preview-feature-direct-publish/m-p/107751#M42915</link>
      <description>&lt;P&gt;Hi Sidhan,&lt;BR /&gt;thanks a lot for your reply, it works very well to write materialized views to a different schema than the default schema.&lt;BR /&gt;Thanks for your guidance!&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;Susanne&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2025 09:13:11 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/views-in-dlt-with-private-preview-feature-direct-publish/m-p/107751#M42915</guid>
      <dc:creator>susanne</dc:creator>
      <dc:date>2025-01-30T09:13:11Z</dc:date>
    </item>
  </channel>
</rss>

