cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Views in DR environment

DineshOjha
New Contributor III

Hi Team,

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.

Whats the approach that Darabricks recommends for this?

 

Thank you

 

 

1 REPLY 1

Ashwin_DSA
Databricks Employee
Databricks Employee

Hi @DineshOjha,

This is expected behaviour. 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.

For views, the recommended pattern is usually to treat them as deployment artefacts rather than data assets. In other words:

  • Use DEEP CLONE to replicate the underlying Delta tables to DR
  • Keep the view definitions in source control or your deployment tooling
  • Recreate the views in DR with CREATE OR REPLACE VIEW after the table clone step completes

That approach tends to be the cleanest for DR because views are logical definitions over tables, not physical data copies.

A simple way to think about it is:

  • tables โ†’ cloned
  • views โ†’ redeployed

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.

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.

If this answer resolves your question, could you mark it as โ€œAccept as Solutionโ€? That helps other users quickly find the correct fix.

Regards,
Ashwin | Delivery Solution Architect @ Databricks
Helping you build and scale the Data Intelligence Platform.
***Opinions are my own***