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: 

Creating a test schema - what is the best practice?

Asterol
New Contributor III
  • Hey, 

I've created a schema with few tables with historical data (prod), now I would like to have a Dev/testing environment with exactly the same data.

What do you recommend? CTAS? Shallow clone? Deep clone? I wonder if shallow clone would be sufficient, what is your experience?

1 REPLY 1

Tharun-Kumar
Databricks Employee
Databricks Employee

@Asterol 

If you would like to have the same data for your Dev/testing environment, I would recommend using Deep Clone. Deep clone copies the metadata and creates an independent copy of the table data. 

Shallow clone only copies the metadata and will have a pointer to your production data. Shallow clone only helps for short-lived use cases. 

If you end goal is to create a Dev/testing/production environment, Deep Clone is the way forward. This would help you in using and maintaining them independently.