nerdexam
Snowflake

COF-C02 · Question #369

A tag object has been assigned to a table (TABLE_A) in a schema within a Snowflake database. Which CREATE object statement will automatically assign the TABLE_A tag to a target object?

The correct answer is C. CREATE TABLE <table_name> AS SELECT * FROM TABLE_A. In Snowflake, tag lineage is propagated through CTAS (CREATE TABLE AS SELECT). When a new table is created by selecting from a source table (TABLE_A) that has a tag assigned, the new table automatically inherits that tag. CREATE TABLE ... LIKE copies the structure but not tags…

Data Governance

Question

A tag object has been assigned to a table (TABLE_A) in a schema within a Snowflake database. Which CREATE object statement will automatically assign the TABLE_A tag to a target object?

Options

  • ACREATE TABLE <table_name> LIKE TABLE_A;
  • BCREATE VIEW <view_name> AS SELECT * FROM TABLE_A;
  • CCREATE TABLE <table_name> AS SELECT * FROM TABLE_A;
  • DCREATE MATERIALIZED VIEW <view name> AS SELECT * FROM TABLE A;

How the community answered

(51 responses)
  • A
    6% (3)
  • B
    4% (2)
  • C
    88% (45)
  • D
    2% (1)

Explanation

In Snowflake, tag lineage is propagated through CTAS (CREATE TABLE AS SELECT). When a new table is created by selecting from a source table (TABLE_A) that has a tag assigned, the new table automatically inherits that tag. CREATE TABLE ... LIKE copies the structure but not tags. CREATE VIEW and CREATE MATERIALIZED VIEW do not inherit tags from the source table in this manner. Only CTAS triggers automatic tag propagation from the source to the new object.

Topics

#Snowflake Tags#Tag Propagation#CREATE TABLE AS SELECT#Object Tagging

Community Discussion

No community discussion yet for this question.

Full COF-C02 Practice