An existing clustering key is propagated when a table is created using CREATE TABLE ... LIKE.

Master the SnowPro Advanced Architect Test with flashcards, multiple-choice questions, and detailed explanations. Prepare thoroughly for your certification!

Multiple Choice

An existing clustering key is propagated when a table is created using CREATE TABLE ... LIKE.

Explanation:
Clustering keys are not copied by creating a table with LIKE. When you use CREATE TABLE ... LIKE, Snowflake duplicates the column definitions (names, data types, nullability, defaults, etc.) but does not bring over clustering metadata. The clustering key is part of the table’s metadata, not its basic schema, so it must be defined separately on the new table—either in the CREATE TABLE statement itself with a CLUSTER BY clause or afterward with ALTER TABLE … CLUSTER BY. If you want the new table to be clustered the same way as the source, you have to define that clustering explicitly after creation.

Clustering keys are not copied by creating a table with LIKE. When you use CREATE TABLE ... LIKE, Snowflake duplicates the column definitions (names, data types, nullability, defaults, etc.) but does not bring over clustering metadata. The clustering key is part of the table’s metadata, not its basic schema, so it must be defined separately on the new table—either in the CREATE TABLE statement itself with a CLUSTER BY clause or afterward with ALTER TABLE … CLUSTER BY. If you want the new table to be clustered the same way as the source, you have to define that clustering explicitly after creation.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy