<?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 DR environment in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/views-in-dr-environment/m-p/160888#M54956</link>
    <description>&lt;P&gt;Thank you Ashwin&lt;/P&gt;&lt;P&gt;We have implemented CI/CD pipeline to deploy the jobs, but it doesn't run the jobs.&lt;/P&gt;&lt;P&gt;The jobs which load the data/create the tables need to run at specific times and so that is handled by a separate scheduling tool. In such a scenario, if we add a view creation in the scheduler, that would be redundant as the views need to be created just once. Any suggestions/recommendations on this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 29 Jun 2026 18:42:22 GMT</pubDate>
    <dc:creator>DineshOjha</dc:creator>
    <dc:date>2026-06-29T18:42:22Z</dc:date>
    <item>
      <title>Views in DR environment</title>
      <link>https://community.databricks.com/t5/data-engineering/views-in-dr-environment/m-p/160550#M54903</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;We are currently using the Databricks Deep clone feature to clone our tables to Databricks DR environment. When we deploy our jobs, they run in production and the tables get cloned to the DR. But the views dont get cloned as deepclone doesnt support views.&lt;/P&gt;&lt;P&gt;Whats the approach that Darabricks recommends for this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2026 17:25:34 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/views-in-dr-environment/m-p/160550#M54903</guid>
      <dc:creator>DineshOjha</dc:creator>
      <dc:date>2026-06-25T17:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: Views in DR environment</title>
      <link>https://community.databricks.com/t5/data-engineering/views-in-dr-environment/m-p/160582#M54908</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/147238"&gt;@DineshOjha&lt;/a&gt;,&lt;/P&gt;
&lt;P data-pm-slice="1 1 []"&gt;This is expected behaviour.&amp;nbsp;DEEP CLONE is designed for tables, so it works well for keeping Delta tables in sync to a DR environment. The public docs describe clone as creating a copy of a source table at a specific version, and they also note that some object types, such as materialised views, are not supported as either source or target.&lt;/P&gt;
&lt;P class="wnfdntt _1ibi0s3f5 _1ibi0s3ce _1ibi0s3ea"&gt;For views, the recommended pattern is usually to treat them as deployment artefacts rather than data assets. In other words:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Use DEEP CLONE to replicate the underlying Delta tables to DR&lt;/LI&gt;
&lt;LI&gt;Keep the view definitions in source control or your deployment tooling&lt;/LI&gt;
&lt;LI&gt;Recreate the views in DR with CREATE OR REPLACE VIEW after the table clone step completes&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="wnfdntt _1ibi0s3f5 _1ibi0s3ce _1ibi0s3ea"&gt;That approach tends to be the cleanest for DR because views are logical definitions over tables, not physical data copies.&lt;/P&gt;
&lt;P class="wnfdntt _1ibi0s3f5 _1ibi0s3ce _1ibi0s3ea"&gt;A simple way to think about it is:&lt;/P&gt;
&lt;UL&gt;
&lt;LI class="wnfdntt _1ibi0s3f5 _1ibi0s3ce _1ibi0s3ea"&gt;tables → cloned&lt;/LI&gt;
&lt;LI class="wnfdntt _1ibi0s3f5 _1ibi0s3ce _1ibi0s3ea"&gt;views → redeployed&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="wnfdntt _1ibi0s3f5 _1ibi0s3ce _1ibi0s3ea"&gt;So if you already have jobs or CI/CD promoting objects into production, I'd recommend extending that same process to publish the view DDL into the DR environment as well, after the table sync finishes.&lt;/P&gt;
&lt;P class="wnfdntt _1ibi0s3f5 _1ibi0s3ce _1ibi0s3ea"&gt;If it helps, I'd summarise the guidance as...use Deep Clone for the data layer, and manage the semantic layer (views) as code that gets recreated in DR.&lt;/P&gt;
&lt;P class="p1"&gt;&lt;FONT size="2" color="#FF6600"&gt;&lt;STRONG&gt;&lt;I&gt;If this answer resolves your question, could you mark it as “Accept as Solution”? That helps other users quickly find the correct fix.&lt;/I&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;I&gt;&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2026 19:36:28 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/views-in-dr-environment/m-p/160582#M54908</guid>
      <dc:creator>Ashwin_DSA</dc:creator>
      <dc:date>2026-06-25T19:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: Views in DR environment</title>
      <link>https://community.databricks.com/t5/data-engineering/views-in-dr-environment/m-p/160888#M54956</link>
      <description>&lt;P&gt;Thank you Ashwin&lt;/P&gt;&lt;P&gt;We have implemented CI/CD pipeline to deploy the jobs, but it doesn't run the jobs.&lt;/P&gt;&lt;P&gt;The jobs which load the data/create the tables need to run at specific times and so that is handled by a separate scheduling tool. In such a scenario, if we add a view creation in the scheduler, that would be redundant as the views need to be created just once. Any suggestions/recommendations on this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jun 2026 18:42:22 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/views-in-dr-environment/m-p/160888#M54956</guid>
      <dc:creator>DineshOjha</dc:creator>
      <dc:date>2026-06-29T18:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: Views in DR environment</title>
      <link>https://community.databricks.com/t5/data-engineering/views-in-dr-environment/m-p/160893#M54958</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/147238"&gt;@DineshOjha&lt;/a&gt;,&lt;/P&gt;
&lt;P class="wnfdntt _1ibi0s3f5 _1ibi0s3ce _1ibi0s3ea" data-pm-slice="1 1 []"&gt;Got it...that makes sense. If the views are logical objects that only need to be created once, I would treat them differently from the regularly scheduled table-refresh process.&lt;/P&gt;
&lt;P&gt;My recommendation is to add a lightweight deployment step for metadata objects, such as views, separate from the scheduler. For example, you can&amp;nbsp;use DEEP CLONE for the underlying Delta tables and then&amp;nbsp;create the views as part of environment provisioning or deployment, not as part of the recurring schedule. You can then&amp;nbsp;rerun the view DDL only when the definition changes, or when you are standing up or rebuilding the DR environment&lt;/P&gt;
&lt;P class="wnfdntt _1ibi0s3f5 _1ibi0s3ce _1ibi0s3ea"&gt;That is generally not considered redundant, because a standard view does not process or write data. Databricks describes a view as a virtual table with no physical data, and creating a view just registers the query text in the metastore.&lt;/P&gt;
&lt;P&gt;One option is to add a small post-provisioning SQL step in CI/CD that runs after the DR tables are available. For the initial creation, CREATE VIEW or CREATE VIEW IF NOT EXISTS is fine.&lt;/P&gt;
&lt;P&gt;If you later need to change the definition of an existing view, one important nuance is that CREATE OR REPLACE VIEW replaces the existing view and does not preserve privileges granted on the original view. If you want to preserve grants while updating the definition, the docs recommend using ALTER VIEW ... AS ....&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P class="p1"&gt;&lt;FONT size="2" color="#FF6600"&gt;&lt;STRONG&gt;&lt;I&gt;If this answer resolves your question, could you mark it as “Accept as Solution”? That helps other users quickly find the correct fix.&lt;/I&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;I&gt;&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jun 2026 20:35:21 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/views-in-dr-environment/m-p/160893#M54958</guid>
      <dc:creator>Ashwin_DSA</dc:creator>
      <dc:date>2026-06-29T20:35:21Z</dc:date>
    </item>
  </channel>
</rss>

