1 0
Read Time:1 Minute, 24 Second

Cloning Overview : Zero copy cloning lets you create copy of your tables, schemas, databases without copying the actual data.  

Only clone, No copy: Data exists only in one place, Almost no additional storage costs for cloning the data.

As part of cloning overview, When you create a clone for your data, snowflake instead of copying data, creates new metadata information pointing to the data of interest. Global Service layer perform these operations.

The cloud services layer is a collection of services that coordinate activities across Snowflake. These services tie together all of the different components of Snowflake in order to process user requests, from login to query dispatch. The cloud services layer also runs on compute instances provisioned by Snowflake from the cloud provider.

Services managed in this layer include:

  • Authentication
  • Infrastructure management
  • Metadata management
  • Query parsing and optimization
  • Access control

Every Snowflake table has an ID that uniquely identifies the table.

In addition, every table is also associated with a CLONE_GROUP_ID. If a table has no clones, then the ID and CLONE_GROUP_ID are identical. These IDs are displayed in the TABLE_STORAGE_METRICS view.

SELECT * FROM INFORMATION_SCHEMA.TABLE_STORAGE_METRICS WHERE TABLE_NAME = 'EMPLOYEES' AND TABLE_CATALOG='DEMO_DB' AND TABLE_SCHEMA = 'PUBLIC' AND TABLE_DROPPED IS NULL AND SCHEMA_DROPPED IS NULL;

Cloning a database or schema does not clone objects of the following types in the database or schema:

  • External tables
  • Internal (Snowflake) stages

It creates the cloning of non temporary tables i.e Permanent and transient

Database clone leads to create below objects.

  • Permanent and Transient tables
  • Schema
  • Pipes,stages
  • Streams with one catch: Streams data does not copied

To know more about cloning in production, Click here.

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

Leave a Reply

Your email address will not be published. Required fields are marked *