CertSafari
    Snowflake SnowPro Advanced: Security Engineer (SEA-C01)· Lessons

    Domain 2 · Lesson 8/21

    Data Lifecycle Management: Transient Tables, Aging Signals and Storage Lifecycle Policies

    Establish and manage data retention and data lifecycle management.

    9 min read
    4.29% of exam
    7 sources
    Published 5 Oct 2026
    Docs as of 4 Oct 2026

    What you will be able to do

    • Choose between permanent, transient and temporary tables based on how much recovery the data needs
    • Use table storage metrics, SHOW … HISTORY and access history to decide which data should age out
    • Create a storage lifecycle policy that archives and then expires rows automatically
    • Explain what the sources do and do not provide for compliance-driven retention

    1.Transient and temporary tables: retention by design

    The cheapest way to manage a lifecycle is to set it when the object is created. Snowflake supports two non-permanent table types for transitory data.

    A temporary table exists only in the session that created it and is not visible to other users. That makes it the built-in auto-drop: when the session ends, the data is purged, and neither the user nor Snowflake can recover it. A procedure-scoped temporary table, created inside a Snowflake Scripting stored procedure, has an even shorter life. Temporary tables add to storage charges for as long as they exist, so Snowflake recommends dropping them explicitly and logging out of inactive sessions. One security detail matters here: in that session, a temporary table takes precedence over a permanent table with the same name in the same schema. Keep this in mind before dropping a table and restoring it with Time Travel.

    A transient table stays until someone drops it and is available to any role with the right privileges. Like temporary tables, it has no Fail-safe, so it never incurs Fail-safe costs. You can also create transient databases and schemas. Every table created inside them is transient. Neither type can be converted to another table type after creation, so the choice is final. To move permanent data to transient, you use CREATE TABLE … AS SELECT, re-apply grants, drop the original and optionally rename. If a transient table is cloned from a permanent one, the micro-partitions they share only enter Fail-safe once the transient clone is dropped as well.

    Checkpoint 1 of 5· Fill the gap

    Complete the DDL that creates a table with no Fail-safe period that persists until explicitly dropped.

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

    Sources12

    2.Using metadata and access patterns to decide what ages out

    Before you shorten retention or archive anything, collect evidence on two things: where storage is going and whether anyone still reads the data.

    For storage, the TABLE_STORAGE_METRICS view breaks each table's billed bytes into ACTIVE_BYTES, TIME_TRAVEL_BYTES, FAILSAFE_BYTES and RETAINED_FOR_CLONE_BYTES, and also shows TABLE_CREATED and TABLE_DROPPED. A table with high TIME_TRAVEL_BYTES or FAILSAFE_BYTES compared with its active data is paying a lot to keep history, which makes it a candidate for a shorter retention period or a transient redesign. Its IS_TRANSIENT column tells you which tables already have no Fail-safe.

    For current retention settings, use the retention_time column of the SHOW commands. Adding HISTORY includes objects that have already been dropped:

    Databases retaining more than the default, including dropped onessql
    SHOW DATABASES HISTORY
      ->> SELECT "name", "retention_time", "dropped_on"
            FROM $1
            WHERE "retention_time" > 1;

    For access patterns, the ACCESS_HISTORY view records reads and writes. Tables a query reads directly appear in base_objects_accessed and direct_objects_accessed, and tables it writes appear in objects_modified. A table that keeps growing but never shows up as accessed is a strong candidate for archival.

    Checkpoint 2 of 5· Check yourself

    Which TABLE_STORAGE_METRICS column shows how many of a table's billed bytes exist only because of its Time Travel retention period?

    Checkpoint 3 of 5· Exam question

    A table was dropped by mistake 10 days ago. It was a permanent table with `DATA_RETENTION_TIME_IN_DAYS = 7`, and the account is on Enterprise Edition. A data owner runs `UNDROP TABLE` as `ACCOUNTADMIN` and the statement fails. What is the only remaining path to recover the data?

    Sources34

    3.Automating archival and purging with storage lifecycle policies

    Once you know which rows should age out, a storage lifecycle policy enforces it. The policy is a schema-level object that applies to standard, transient, dynamic, and interactive tables that don't auto-refresh. Its expression picks out rows by age or any other condition. Each matching row is then either archived to a cheaper tier or expired, which deletes it permanently. If you specify an archive period, the rows sit in the archive for that many days and are then expired. Attaching a policy also turns on change tracking for the table.

    A policy that archives rows for closed accounts after 60 days to COOL storage for 90 dayssql
    CREATE STORAGE LIFECYCLE POLICY my_slp
      AS (event_ts TIMESTAMP, account_id NUMBER)
      RETURNS BOOLEAN ->
        event_ts < DATEADD(DAY, -60, CURRENT_TIMESTAMP())
        AND EXISTS (
          SELECT 1 FROM closed_accounts
          WHERE id = account_id
        )
      ARCHIVE_TIER = COOL
      ARCHIVE_FOR_DAYS = 90;
    Choosing an archive tier
    TierMinimum archival periodRetrievalRelative cost
    COOL90 daysFast, instant retrievalHigher storage and retrieval cost than COLD
    COLD180 daysUp to 48 hours; max 1 million files per restoreOne-fourth the cost of COOL

    Some operating constraints to plan for. The tier choice is permanent: once a table has an archival policy attached, it stays on that tier for its whole life. Archived rows cannot be queried in place. You retrieve them into a new table with CREATE TABLE … FROM ARCHIVE OF, and SYSTEM$GET_TABLE_ARCHIVE_METADATA shows row counts and min/max values without retrieval costs. UPDATE, DELETE and MERGE are locked while a policy runs, but INSERT and COPY still work. Large backlogs can take several daily runs to clear. Policies do not follow clones automatically. They also bypass governance policies internally while they evaluate rows. The interaction with recovery is important too: UNDROP within Time Travel restores a table's archived data as well, but archived or expired data from a transient table can never be recovered through Fail-safe.

    Checkpoint 4 of 5· Put it in order

    Put the storage lifecycle policy lifecycle in order

    1. 1.After the archive period elapses, Snowflake expires the rows from archive storage
    2. 2.Snowflake runs the policy daily and archives matching rows
    3. 3.Attach the policy to one or more tables
    4. 4.Snowflake runs the policy for the first time, typically within a few minutes
    5. 5.Create a policy with an expression that identifies rows to archive or expire

    Sources56

    4.Aligning retention with compliance requirements

    Turning a regulation into Snowflake settings comes down to the controls covered above. Use MIN_DATA_RETENTION_TIME_IN_DAYS for a recovery floor that table owners cannot lower. Use DATA_RETENTION_TIME_IN_DAYS in DDL to set retention per database, schema or table. Use table type to cap how long history can exist at all. Use storage lifecycle policies to archive data for a set period and then delete it. Snowflake describes lifecycle policies as a compliance tool: you can archive for a fixed time and then expire, or expire directly without archiving.

    The sources for this lesson stop there. They do not map these controls to specific regulations such as GDPR or HIPAA. They do not describe different retention strategies for structured and semi-structured data, and they do not describe a tag-based way to apply retention settings. If you need those mappings, take them from your organisation's legal requirements and the tagging documentation, not from this page. One documented fact does matter for deletion-driven requirements: a transient table has no Fail-safe, so once its archive expires, the data cannot be recovered by anyone.

    Checkpoint 5 of 5· Check yourself

    A policy must keep inactive-customer rows recoverable on request for six months and then delete them permanently, as cheaply as possible on an AWS account. Retrieval within two days is acceptable. Which configuration fits?

    Sources5

    Exam traps

    Each one states something that sounds right. Open it to see what is actually true.

    1. 1.Data archived or expired from a transient table can still be recovered by Snowflake Support through Fail-safe.Why is that wrong?

      Transient tables have no Fail-safe period, so once the archive expires or is dropped, the data is gone for good.

      Covered in Automating archival and purging with storage lifecycle policies

    2. 2.You can start a table on COOL archival and move it to COLD later by swapping policies.Why is that wrong?

      A table keeps the archive tier of the first archival policy attached to it for its whole lifetime. Changing tiers requires Snowflake Support to delete the existing archived data.

      Covered in Automating archival and purging with storage lifecycle policies

    Sources

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

    1. 1.
      “When the session ends, data in the table is purged and is not recoverable”
      ↩︎ Transient and temporary tables: retention by design
      “After creation, transient tables cannot be converted to any other table type.”
      ↩︎ Transient and temporary tables: retention by design
    2. 2.
      “Long-lived tables, such as fact tables, should always be defined as permanent to ensure they are fully protected by Fail-safe.”
      ↩︎ Transient and temporary tables: retention by design
    3. 3.
      “To include information about objects that have already been dropped, include the HISTORY clause with the SHOW command.”
      ↩︎ Using metadata and access patterns to decide what ages out
    4. 4.
      “base_table in the base_objects_accessed and direct_objects_accessed columns because the table was accessed directly and is the source of the data.”
      ↩︎ Using metadata and access patterns to decide what ages out
    5. 5.
      “Use these policies to archive or expire specific table rows based on conditions that you define, such as data age or other criteria.”
      ↩︎ Automating archival and purging with storage lifecycle policies
      “When a storage lifecycle policy is running on a table, Snowflake locks UPDATE, DELETE, and MERGE operations.”
      ↩︎ Automating archival and purging with storage lifecycle policies
      “Automatically meet compliance requirements by configuring policies to archive or expire data according to regulatory standards.”
      ↩︎ Aligning retention with compliance requirements
      “Because transient tables have no Fail-safe period, archived or expired data from a transient table”
      ↩︎ Exam trap 1
      “If you attach an archival storage policy to a table, the table is permanently assigned to the specified archive tier for its lifetime.”
      ↩︎ Exam trap 2
      “Snowflake waits until the specified archive period elapses before expiring the data from archive storage.”
      ↩︎ Checkpoint

    Also cited

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