Snowflake - SnowPro Advanced Data Engineer Study Guide

    4: Storage and Data Protection

    This chapter covers the storage protection surface assessed in Domain 4 of the DEA-C02 exam, including Time Travel and Fail-safe retention semantics, account-level cross-region and cross-cloud replication with failover groups, system functions for micro-partition and clustering analysis, zero-copy cloning patterns for development workflows, and the rollback playbooks that combine Time Travel with cloning to recover from pipeline failures.

    Learning Objectives

    By the end of this chapter, you will be able to:

    • Implement Time Travel, Fail-safe, and cross-region and cross-cloud replication.
    • Use system functions for micro-partition analysis (clustering depth, cluster keys, automatic clustering).
    • Clone objects for development workflows and manage permission inheritance on cloned objects.
    • Validate changes and perform rollback using Time Travel and zero-copy cloning.

    Executive Summary

    • Time Travel retention is 1 day by default and can be configured from 0 to 90 days on Enterprise Edition or higher for Permanent tables, followed by 7 days of non-configurable Fail-safe on Permanent objects only.
    • Cross-region and cross-cloud replication is implemented through Replication Groups and Failover Groups, which package databases, shares, roles, users, warehouses, and resource monitors into a single replicated unit that fails over atomically.
    • Micro-partition analysis hinges on SYSTEM$CLUSTERING_INFORMATION, SYSTEM$CLUSTERING_DEPTH, and the AUTOMATIC_CLUSTERING_HISTORY view, with average_depth, average_overlaps, and total_constant_partition_count driving the recluster decision.
    • Cloning is a metadata operation that creates a new object pointing at the same micro-partitions; permission inheritance differs by object level, and COPY GRANTS is required to copy privileges on table and view clones.

    Assumptions

    • All examples assume Snowflake Enterprise Edition or higher unless noted, and Failover Group examples assume Business Critical Edition on both source and target accounts.
    • All retention and clustering metadata is read through ACCOUNT_USAGE or INFORMATION_SCHEMA, and timestamps in code examples use fictional year 2099 values to avoid anchoring the material to any real reporting period.
    • Terms defined in Chapters 1 through 3 (Time Travel, Fail-safe, micro-partition, SYSTEM$CLUSTERING_INFORMATION, average_depth, average_overlaps, automatic clustering, AUTOMATIC_CLUSTERING_HISTORY, SUSPEND RECLUSTER, RESUME RECLUSTER, Materialized View, share, clone, direct share, secure view, row access policy, Dynamic Table, Stream, Task) are reused with the same meaning and are not re-introduced.

    Sections in this chapter

    1. Free
    2. Free with account
    3. Free with account
    4. Free with account
    5. Free with account