CertSafari
    Snowflake SnowPro Advanced: Administrator (ADA-C02)· Lessons

    Domain 3 · Lesson 12/24

    Snowflake table types, table design and zero-copy cloning

    Given a scenario, manage databases, tables, and views.

    17 min read
    3% of exam
    7 sources
    Published 20 Oct 2026
    Docs as of 18 Oct 2026

    What you will be able to do

    • Choose between permanent, transient and temporary tables based on how long the data has to live and how much recovery it needs
    • Predict what a session sees when a temporary table has the same name as a permanent one
    • Decide which constraints Snowflake enforces and when a table actually benefits from a clustering key
    • Use zero-copy clones of databases, schemas and tables, and know what a clone leaves out
    • Weigh table design considerations for fact and dimension tables, spot high-churn tables from their FAILSAFE_BYTES to ACTIVE_BYTES ratio, and migrate a permanent table to transient

    Key concept

    Table type sets the recovery window — Permanent, transient and temporary tables differ in how long they live, who can see them, and how much historical data Snowflake keeps for them. That kept history is Time Travel plus Fail-safe, and you pay storage for it. Picking the type is how you trade recoverability against storage cost.

    1.Permanent, transient and temporary tables

    Every table is permanent unless you say otherwise. A permanent table keeps the full set of data protection: a Time Travel window you can configure, followed by seven days of Fail-safe. Both of these keep old micro-partitions around, and those old micro-partitions are billed as storage. For data that you could rebuild at any time, much of that cost buys nothing, so Snowflake offers two lighter table types, created with the TRANSIENT and TEMPORARY keywords.

    A temporary table belongs to one session. It stays for the rest of that session and no other user or session can see it. When the session ends, its data is purged and can't be recovered, not by you and not by Snowflake. Any role can create one, because it doesn't need the CREATE TABLE privilege on the schema. Its data still counts towards storage while it exists, so drop large temporary tables explicitly rather than leaving a session open for days. Dropping them also avoids a quieter problem: workloads that create very many temporary tables slow down queries against the Information Schema COLUMNS and TABLES views. Inside a Snowflake Scripting stored procedure you can also create a procedure-scoped temporary table, which lasts for only one execution of the procedure.

    A transient table stays until you drop it, and every role with the right privileges can see it. In that respect it behaves like a permanent table, but it has no Fail-safe period, so there are no Fail-safe costs. Snowflake Backups also don't support transient tables. You can set TRANSIENT on a schema or a database too. Every table created in a transient schema is transient, and so is every schema created in a transient database. Choose the type carefully, because neither a transient nor a temporary table can be converted to another table type after it is created.

    Creating a transient table: the only change from a permanent table is the keywordsql
    CREATE TRANSIENT TABLE mytranstable (id NUMBER, creation_date DATE);
    How the three table types differ in lifetime and historical data kept
    Table typeLifetime and visibilityTime Travel retention (days)Fail-safe (days)
    PermanentUntil dropped; all roles with privileges0 or 1 (Standard Edition); 0 to 90 (Enterprise Edition)7
    TransientUntil dropped; all roles with privileges0 or 10
    TemporaryRest of the creating session; that session only0 or 10

    Table type is a design decision you make per table, from how its data changes and how you would get it back after a loss. Fact tables are usually very large but see little churn: most changes are inserts of new rows or, sometimes, deletions of old ones. Time Travel and Fail-safe protect them fully at a very low storage cost, so long-lived tables such as fact tables should always be permanent. Short-lived tables that live less than a day, such as ETL work tables, can be transient to eliminate Fail-safe costs.

    Dimension tables need a closer look, because row updates and deletions are much more common in them. Each update re-creates the affected micro-partitions, and the old versions then pass through Time Travel and Fail-safe. On a large, high-churn table that history can dwarf the live data. Take a table of 200 GB where every row is updated 20 times a day: it carries 4 TB of Time Travel and 28 TB of Fail-safe on top of its 200 GB of active storage. To find such tables, divide FAILSAFE_BYTES by ACTIVE_BYTES in the TABLE_STORAGE_METRICS view; a large ratio marks a high-churn table. Most of them should still be permanent, because they are usually small and storage is inexpensive. Only when the cost is truly excessive does the alternative pay off: make the table transient with DATA_RETENTION_TIME_IN_DAYS=0, copy it into a permanent table on a schedule as a full backup, and delete the old backup each time a new one is made.

    Recovery time belongs in the design as well as storage cost. Once its Time Travel period ends, a transient table's history can't be recovered by Snowflake, so keep transient tables for data you can reproduce outside Snowflake. Where downtime and the time to reload lost data matter, a permanent table can be the cheaper design overall despite its Fail-safe cost. If you do decide an existing permanent table should be transient, migrate it in four steps: create and fill the transient table with CREATE TABLE … AS SELECT, apply the original table's grants to it, drop the original, and optionally rename the new table to the old name.

    Checkpoint 1 of 8· Fill the gap

    Each night an ETL job reloads a staging table from files kept in cloud storage. Reporting jobs read it the next morning in their own sessions, under other roles. Because the data can be rebuilt, you don't want to pay for Fail-safe storage. Which keyword completes the DDL?

    CREATE  ?  TABLE mytranstable (id NUMBER, creation_date DATE);

    Checkpoint 2 of 8· Exam question

    A nightly ETL job in a production database rebuilds several large staging tables from files that are retained in cloud storage, so the data can always be reloaded. The administrator wants to cut storage charges caused by Time Travel and Fail-safe on these tables. Which approach is MOST appropriate?

    Checkpoint 3 of 8· Put it in order

    A large permanent work table holds data you can rebuild, and you decide it should be transient. Put the migration steps in order.

    1. 1.Apply the access control privileges granted on the original table to the new table
    2. 2.Create and populate a transient table from the permanent one with CREATE TABLE … AS SELECT
    3. 3.Drop the original permanent table with DROP TABLE
    4. 4.Rename the new transient table to the original name with ALTER TABLE

    Sources12345

    2.When a temporary table shares a name

    Temporary tables are exempt from the usual rule that names in a schema must be unique. A temporary table lives in a database and schema like any other table, but because it is tied to a session you can create one with the same name as an existing permanent or transient table in the same schema. The statement succeeds, and from then on the temporary table wins for the rest of that session.

    In practice the temporary table hides the other one. Every query, DML statement and DDL statement in that session that names the table acts on the temporary table only. The permanent table is untouched and other sessions still see it. In your own session it reappears once you drop the temporary table or the session ends. The order of creation doesn't matter either: a permanent table created after a same-named temporary table is hidden in that session as well.

    Checkpoint 4 of 8· Check yourself

    In one session you create a temporary table STAGE_ORDERS in schema SALES. Later in the same session, you run CREATE TABLE stage_orders in SALES to make a permanent table, then INSERT 1,000 rows INTO stage_orders. What is the result?

    Checkpoint 5 of 8· Exam question

    A data engineer runs CREATE TEMPORARY TABLE orders AS SELECT * FROM raw_orders WHERE load_date = CURRENT_DATE() in a schema that already contains a permanent table named ORDERS. What happens when the same session then runs SELECT * FROM orders?

    Sources1

    3.Data types, constraints and clustering keys

    Store dates and timestamps in DATE or TIMESTAMP columns, not in VARCHAR. Snowflake stores these types more efficiently, and queries run faster as a result. Pick the date or timestamp type that matches the precision you need.

    Constraints on standard tables are mostly metadata. Primary key, foreign key and unique constraints are not enforced, while NOT NULL and CHECK are. Hybrid tables are the exception, because there every constraint is enforced. Declaring keys is still worth doing. They document how tables relate, most BI tools import foreign keys to build join conditions, and some tools use them to rewrite queries more efficiently, for example by using join elimination. Your load process remains responsible for keeping keys unique.

    An out-of-line primary key on one table and a foreign key that references it from anothersql
    CREATE OR REPLACE TABLE salespeople (
      sp_id INT NOT NULL UNIQUE,
      name VARCHAR DEFAULT NULL,
      region VARCHAR,
      constraint pk_sp_id PRIMARY KEY (sp_id)
    );
    CREATE OR REPLACE TABLE salesorders (
      order_id INT NOT NULL UNIQUE,
      quantity INT DEFAULT NULL,
      description VARCHAR,
      sp_id INT NOT NULL UNIQUE,
      constraint pk_order_id PRIMARY KEY (order_id),
      constraint fk_sp_id FOREIGN KEY (sp_id) REFERENCES salespeople(sp_id)
    );

    You can check which constraints exist in two ways. GET_DDL('TABLE', ...) returns a CREATE statement that includes them, and the Information Schema TABLE_CONSTRAINTS view lists them for a whole schema or database.

    Most tables don't need a clustering key. Snowflake already organises data into micro-partitions as it loads, and data loaded by date is usually queried by date too. Clustering a small table rarely helps much. For a large table, a clustering key is worth considering in two cases. The first is when the load order doesn't match the way the table is filtered, for example rows arrive by date but reports filter by ID. A multi-column key can help when queries filter on several columns. The second is when the Query Profile shows that scanning takes up a large share of typical queries' run time.

    Reclustering has a cost. It rewrites the existing data in a new order and keeps the previous order for 7 days as Fail-safe protection. It also uses compute in proportion to how much data is reordered. On a very large table whose queries are already fast, a clustering key adds that cost and gives nothing back.

    Checkpoint 6 of 8· Check yourself

    A load job writes into a standard (non-hybrid) table declared with id INT NOT NULL and PRIMARY KEY (id). The batch contains some rows with a NULL id and some rows that repeat an existing id. Which rows does Snowflake reject?

    Checkpoint 7 of 8· Check yourself

    Which of these tables is the strongest candidate for a clustering key?

    Sources6

    4.Zero-copy cloning of databases, schemas and tables

    A clone is a new object that shares the source's existing micro-partitions instead of copying them. It is ready almost at once and adds no storage at first. Storage grows only as the clone diverges from the source: adding, deleting or updating rows in a cloned table creates new micro-partitions that belong to the clone alone, and so does creating a new populated table in a cloned schema. That makes a clone the cheap way to get a full, independent working copy of production data. One common example is a transient clone of a permanent table for scratch work.

    Cloning a database or schema is recursive, with some exceptions. Cloning a database clones its schemas and the objects inside them, but only the objects that the cloning role has the right privileges on. External tables are never cloned. Hybrid tables are cloned with a database but not with a schema. You can also clone an object as it was at an earlier point in time with an AT clause, though user tasks are left out of a schema cloned with a timestamp.

    Cloning a schema as it existed at a past timestampsql
    CREATE SCHEMA S2 CLONE S1 AT(TIMESTAMP => '2025-04-01 12:00:00');

    Two side effects catch people out. First, a cloned table copies the structure and data but not the load history. A COPY job pointed at the clone can therefore load the same files a second time. Second, shared micro-partitions affect Fail-safe. Suppose you make a transient clone of a permanent table and then drop the permanent table. Any bytes the clone still shares enter Fail-safe only when the transient clone is dropped as well, so the Fail-safe storage charge arrives later than you might expect.

    Checkpoint 8 of 8· Check yourself

    You make a transient clone of a large permanent table for scratch work and update only a few rows in it. A week later you drop the permanent source table but keep the clone. When do the micro-partitions the clone still shares with the source enter the 7-day Fail-safe period?

    Sources71

    Sources

    (7)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “In addition to permanent tables, which is the default table type when creating tables, Snowflake supports defining tables as either temporary or transient.”
      ↩︎ Permanent, transient and temporary tables
      “When the session ends, data in the table is purged and is not recoverable”
      ↩︎ Permanent, transient and temporary tables
      “creating a temporary table does not require the CREATE TABLE privilege on the schema in which the object is created”
      ↩︎ Permanent, transient and temporary tables
      “you are very likely to experience degraded performance when you query the COLUMNS view or TABLES view in the Information Schema”
      ↩︎ Permanent, transient and temporary tables
      “All tables created in a transient schema, as well as all schemas created in a transient database, are transient by definition.”
      ↩︎ Permanent, transient and temporary tables
      “After creation, transient tables cannot be converted to any other table type.”
      ↩︎ Permanent, transient and temporary tables
      “the temporary table takes precedence in the session over any other table with the same name in the same schema”
      ↩︎ When a temporary table shares a name
      “Subsequently, all queries and other operations performed in the session on the table affect only the temporary table.”
      ↩︎ When a temporary table shares a name
      “When rows are added, deleted, or updated in the clone, it results in new micro-partitions that belong exclusively to the clone”
      ↩︎ Zero-copy cloning of databases, schemas and tables
      “those shared bytes will only enter Fail-safe when the transient table is deleted.”
      ↩︎ Zero-copy cloning of databases, schemas and tables
      “Transient tables are similar to permanent tables with the key difference that they do not have a Fail-safe period.”
      ↩︎ Exam trap 1
    2. 2.
      “External tables are read-only. You can’t perform data manipulation language (DML) operations on external tables.”
      ↩︎ Permanent, transient and temporary tables
    3. 3.
      “Fact tables are typically very large in size and experience a low degree of churn (row updates or deletes).”
      ↩︎ Permanent, transient and temporary tables
      “Row updates and deletions are much more common in dimension tables.”
      ↩︎ Permanent, transient and temporary tables
      “High-churn dimension tables can be identified by calculating the ratio of FAILSAFE_BYTES divided by ACTIVE_BYTES in the TABLE_STORAGE_METRICS view.”
      ↩︎ Permanent, transient and temporary tables
      “create these tables as transient with zero Time Travel retention (i.e. DATA_RETENTION_TIME_IN_DAYS=0)”
      ↩︎ Permanent, transient and temporary tables
      “even if the ratio is high, the preferred option is to create these tables as permanent and use CDP to protect the data.”
      ↩︎ Exam trap 2
    4. 4.
      “Long-lived tables, such as fact tables, should always be defined as permanent to ensure they are fully protected by Fail-safe.”
      ↩︎ Permanent, transient and temporary tables
      “Use transient tables only for data you can replicate or reproduce independently from Snowflake.”
      ↩︎ Permanent, transient and temporary tables
      “Transient and temporary tables have no Fail-safe period.”
      ↩︎ Key concept
      “Transient and temporary tables can have a Time Travel retention period of either 0 or 1 day.”
      ↩︎ Prediction
    5. 5.
      “Use DROP TABLE to delete the original tables.”
      ↩︎ Permanent, transient and temporary tables
      “Use CREATE TABLE … AS SELECT to create and populate the transient tables with the data from the original, permanent tables.”
      ↩︎ Checkpoint
    6. 6.
      “Snowflake stores DATE and TIMESTAMP data more efficiently than VARCHAR, resulting in better query performance.”
      ↩︎ Data types, constraints and clustering keys
      “Some BI and visualization tools also take advantage of constraint information to rewrite queries more efficiently, for example, by using join elimination.”
      ↩︎ Data types, constraints and clustering keys
      “Specifying a clustering key is not necessary for most tables.”
      ↩︎ Data types, constraints and clustering keys
      “The order in which the data is loaded doesn’t match the dimension by which it is most commonly queried”
      ↩︎ Data types, constraints and clustering keys
      “Reclustering a table incurs compute costs that correlate to the size of the data that is reordered.”
      ↩︎ Data types, constraints and clustering keys
      “However, constraints on hybrid tables are enforced”
      ↩︎ Exam trap 3
      “NOT NULL and CHECK constraints are enforced, but other constraints aren’t.”
      ↩︎ Prediction
    7. 7.
      “a clone does not contribute to the overall data storage for the object until operations are performed on the clone”
      ↩︎ Zero-copy cloning of databases, schemas and tables
      “Cloning includes only the objects on which the role that creates the clone has appropriate privileges.”
      ↩︎ Zero-copy cloning of databases, schemas and tables
      “A cloned table does not include the load history of the source table.”
      ↩︎ Zero-copy cloning of databases, schemas and tables
      “However, the following object types are not cloned: External tables”
      ↩︎ Exam trap 4

    Continue to part 2 of 2

    External tables, Iceberg tables and views in Snowflake

    Spotted a mistake, or was something unclear? Tell us.