Storage and Data Protection
This domain tests your ability to design, configure, and troubleshoot Snowflake's full suite of data protection and storage capabilities. It is one of the larger topic areas on the SnowPro Advanced: Data Engineer (DEA-C02) exam under the current (carried-over, unverified) blueprint weighting, so weaknesses here directly threaten a passing score. Expect questions on exact parameter names, default values, tier-specific behaviors, recovery windows, replication topology, and cost implications of storage choices.
Time Travel
Time Travel lets you query, clone, or restore data as it existed at any point within a configurable retention window, using historical micro-partitions Snowflake retains after DML operations.
Configuration
| Parameter | Default | Max (Standard Edition) | Max (Enterprise+) |
|---|---|---|---|
DATA_RETENTION_TIME_IN_DAYS | 1 day | 1 day | 90 days |
| Scope | Account, database, schema, table | Same | Same |
| Transient tables | 0 days (fixed) | 0 days | 0 days |
| Temporary tables | 0 days (fixed) | 0 days | 0 days |
Critical: Transient and temporary tables have no Time Travel — they default to 0 and cannot be changed. Setting
DATA_RETENTION_TIME_IN_DAYS = 1on a schema does not propagate to transient tables within it.
AT and BEFORE Syntax
-- Query data as of an exact timestamp
SELECT * FROM orders AT (TIMESTAMP => '2024-03-01 12:00:00'::TIMESTAMP_TZ);
-- Query data just before a specific transaction ID
SELECT * FROM orders BEFORE (STATEMENT => '<query_id>');
-- Clone as of an offset (seconds ago)
CREATE TABLE orders_backup CLONE orders AT (OFFSET => -3600);
| Clause | Argument | Use Case |
|---|---|---|
AT (TIMESTAMP =>) | Timestamp value | Restore to wall-clock time |
AT (OFFSET =>) | Negative seconds integer | Relative rollback |
AT (STATEMENT =>) | Query ID | Reproduce state before/after a DML |
BEFORE (STATEMENT =>) | Query ID | State immediately before that DML ran |
UNDROP
UNDROP TABLE, UNDROP SCHEMA, and UNDROP DATABASE restore dropped objects within the retention window. If the parent schema was also dropped, you must UNDROP SCHEMA first, then UNDROP TABLE.
Common traps
- Exam may claim Standard Edition supports 90-day Time Travel — it does not (max 1 day).
- Setting retention to 0 does not make a permanent table transient; it just disables Time Travel.
BEFORE (TIMESTAMP =>)is not valid syntax; onlySTATEMENTis accepted withBEFORE.- Time Travel storage incurs charges — historical micro-partitions count toward your bill.
- Dropping and immediately re-creating a table with the same name produces a new object with a new retention window; the original is restorable by name only within its original window.
Worked scenario: A batch job accidentally deleted 2 million rows at 14:32 UTC. You have the query ID. The fastest, least-disruptive recovery is CREATE TABLE orders_restored CLONE orders BEFORE (STATEMENT => '<delete_query_id>'), then validate and swap using ALTER TABLE orders SWAP WITH orders_restored.
Fail-safe
Fail-safe is a Snowflake-managed, non-configurable 7-day recovery window that begins after the Time Travel retention period expires.
Figure: Data lifecycle from write through Fail-safe to permanent deletion.
| Property | Time Travel | Fail-safe |
|---|---|---|
| Duration | 0–90 days (configurable) | 7 days (fixed) |
| Access | Customer (SQL) | Snowflake Support only |
| Self-service | Yes | No |
| Applies to | Permanent tables | Permanent tables only |
| Transient / Temporary | Yes (0 days default) | No Fail-safe |
| Storage cost | Charged to customer | Charged to customer |
Key point: Transient tables have no Fail-safe. This is the primary reason to choose transient tables for scratch or staging data — you eliminate both Time Travel and Fail-safe storage costs.
Common traps
- Fail-safe is sometimes described as "customer-accessible via special commands" — false. Only Snowflake Support can initiate Fail-safe recovery.
- The 7-day Fail-safe period is not configurable at any edition or tier.
- Total maximum data retention cost window for permanent tables = Time Travel + Fail-safe (e.g., 90 + 7 = 97 days on Enterprise).
- Transient tables save cost but sacrifice recoverability — exam tests whether you recognize this trade-off.
Unlock with a paid plan
12 more sections (about 2,369 words) continue below. Every paid plan unlocks all DEA-C02 study guides, the full question bank and mock exams, from $4.97/month.