Creating a test schema - what is the best practice?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2023 12:00 AM
- 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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2023 10:17 PM
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.

