14 Zero+Copy+Cloning
14 Zero+Copy+Cloning
Zero-copy Clone
• Snowflake allows you to create clones, also known as “zero-copy clones” of
tables, schemas, and databases in seconds.
• We can maintain multiple copies of data with no additional cost, so call zero copy.
• A snapshot of data present in the source object is taken when the clone is created,
and is made available to the cloned object.
• The cloned object is writable, and is independent of the clone source.
• Changes made to either the source object or the cloned object are not part of the
other.
• Two popular use cases of cloning in real time are
• Cloning Prod data into Dev/Test environment for our unit testing in the lower
environment
• Taking back up of data
Cloning syntax
• CREATE OR REPLACE ‘CLONED_OBJECT_TYPE’ ‘CLONED_OBJECT_NAME’
CLONE ‘SOURCE_OBJECT’;
Here Clone object type can be
Database
Schema
Table
Stage
File Format
Task
Stream
Objects that can be cloned
• Data Storage Objects
• Databases
• Schema
• Tables
• Streams
• Data Configuration Objects
• File Formats
• Stages
• Tasks
Thank You