2025 Cloning Flashcards

1
Q

What is zero copy cloning

A

Enables users to take a “point-in’time” snapshot of tables, schemas, and databases and generate a reference to an underlining partition that originally shares the underlying storage until users makes a change

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

In INFORMATION_SCHEMA.TABLE_STORAGE_METRICS table, how can you use ID and CLONE_GROUP_ID to tell if a table is a clone

A

If the two values are different, then the table is cloned.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

When created, does the cloned table include the source table load history?

A

No, so users can reload the same files in the clone object as were loaded in the source table.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the minimum set of privileges required to create a clone

A

SELECT on the source table
OWNERSHIP privilege for source objects like pipes, streams, and tasks
USAGE privilege on other objects

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

If you create a clone of a database or a schema, does the clone include all the child objects

A

Yes, all active at the time of the clone

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do permissions work on a clone

A
  • Parent object privileges don’t transfer automatically unless you specify COPY GRANTS
  • But if you do use COPY GRANTS on a container, all its contents will maintain their original privilege structure
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What can be cloned in Snowflake

A

Databases
Schemas
Tables
Streams
Stages
File Formats
Sequences
Tasks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What type of tables can be cloned

A

Permanent/transient/temporary
Temporary tables can only be cloned to a temporary or transient table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Can you use Time Travel to clone a table at a specific point in time

A

Yes, using AT or BEFORE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

When does a cloned table reference a cloned sequence

A

When the database containing both is cloned

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

If a cloned table with a FK is cloned but the associated table with the PK is not cloned, where does the FK point

A

To the original source table. If they were both cloned, the clone would point a the clone.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What happens when a table being cloned has a clustering key?

A

The clone has the same clustering key, but auto clustering is suspended by default.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

When a database is cloned, what is not cloned

A

Internal named stages (and any pipes associated with those stages) and external tables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What happens to tasks in a cloned database/schema

A

They are suspneded by default

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

When cloning, should you execute any DML commands on the source object

A

No, cloning is not instantaneous and does not lock the source object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Should you use zero-copy cloning when there is a need to mask specific columns for security reasons?

A

No, cloning preserves the data as-is. Instead, copy the data and apply masking

17
Q

When cloning a table, is it possible to copy the permissions from the original table

A

Yes, and only tables. You use the COPY GRANTS syntax

18
Q

When cloning any database, what happens to pipes referring to internal stages

A

They are not cloned