Data Protection and Sharing
1. Data Protection and Sharing
In this video we're covering two of Snowflake's most powerful features for production data work: Time Travel for recovering from mistakes, and zero-copy cloning for creating instant copies of your data. We'll also touch on how data sharing works in Snowflake.2. When Something Goes Wrong
An analyst at Snowy Peak runs a DELETE with the wrong WHERE clause. Eight hundred and forty-seven active subscription rows are gone. In most databases, that's a support ticket and a restore from last night's backup but that’s hours of downtime, potentially lost data. With Snowflake, it’s a quick-fix because Snowflake preserves the state of your data before every change. It’s automatic without extra configuration, you only need to configure the window of time. That window is something we touched on in previous videos, it’s called Time-Travel.3. Time Travel
Time Travel lets you query data as it existed at any point within the retention window. You set that window with the parameter `DATA_RETENTION_TIME_IN_DAYS` at the table level, and you can also set defaults or overrides at schema, database, or account scope, the lowest level wins. On Standard edition, a one-day window is the common case; on Enterprise and higher you can often extend up to ninety days on eligible objects. Check current edition and object rules in the documentation. Time Travel isn't limited to SELECT queries. It works with CREATE TABLE AS SELECT, CLONE operations, and UNDROP - the command that restores a dropped object. Historical access across the whole object lifecycle, not just the rows inside a table.4. Navigating History: Timestamp and Offset
`AT TIMESTAMP` pins you to an exact moment. `AT OFFSET` or a signed interval steps backward a known duration for example, one hour.5. Navigating History: Statement and Undrop
`BEFORE(STATEMENT => '…')` and `AT BEFORE` ties recovery to a specific statement using its query id, you return to the state of the data immediately before that statement ran. In Snowflake, `DROP` removes an object, it does not mean "go back in time" by itself. If someone accidentally dropped a table, use `UNDROP. For example `UNDROP TABLE t`, while the object is still recoverable in the account.6. Fail-Safe
Beyond the Time Travel window, Snowflake automatically holds your data for a further seven days in Fail-safe. This is on by default — there's nothing to enable or configure. You can't query it yourself during that period, but if you need it, Snowflake Support can recover it for you. That recovery is included in your account — there's no additional support charge for it. What does cost money is the storage itself: data in Fail-safe still counts against your bill for those seven days. It's a last resort, not a replacement for Time Travel. There are four stages your data moves through in Snowflake. Live is what exists right now. Time Travel lets you reach back into history up to one day on Standard Edition, up to ninety days on Enterprise and above. Beyond that, Fail-safe gives Snowflake a further seven days to recover data on your behalf if needed. After that, the data is gone and unrecoverable.7. Zero-Copy Cloning
Zero-copy cloning creates an independent copy of a table, schema, or database with a single line of SQL. You run the CLONE command explicitly — this isn't something Snowflake does automatically in the background. At the point of creation, the clone shares the underlying storage with the original, so no data is physically duplicated and it's effectively instant regardless of table size. Storage is only charged when the two start to diverge — when you write to one and not the other. And crucially, they're fully independent: changes to the clone never touch the original, and changes to the original never affect the clone. For Snowy Peak, they clone the subscriptions table before every production schema change, with zero risk and zero wait.8. Snowflake Marketplace
Finally, Snowflake Marketplace lets you bring in external datasets such as weather data, demographic data, financial feeds from third-party providers, directly inside your Snowflake account. Shared data appears as a database with no need for loading or ETL pipeline. Snowy Peak could pull in historical weather data and join it straight to the avalanche_events table. The Private Data Exchange extends this to sharing with specific accounts which is useful for controlled data collaboration with partners or internal teams.9. Let's practice!
You've seen how Time Travel lets you query and restore data from the past, and how cloning gives you instant, storage-efficient copies. Let's put those skills to work.Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.