# Getting started with Snowflake PT-4 : Time Travel, Security and Data shares

> This is content from just-tim, the data-and-analytics channel by Tim Ngwena (formerly 'Tableau Tim'). Tim has 12+ years of hands-on BI experience and covers Tableau most of all, plus Power BI, Looker, Hex, SQL and data modelling, the analytics industry, and the craft of doing the job — always tool-agnostic and honest about the trade-offs.

- **Author:** Tim Ngwena (just-tim, https://just-tim.com/about)
- **Published:** 2021-05-22
- **Format:** Video · 70 min watch · transcript available
- **Topics:** Data engineering, Analytics, Tool strategy
- **Tools:** Snowflake (data sharing, marketplace, role based access control, time travel, warehouses); SQL (select)
- **Canonical:** https://just-tim.com/posts/getting-started-with-snowflake-pt-4-time-travel-security-and-data-shares
- **Watch:** https://www.youtube.com/watch?v=hyEF-dmQE0g

This is part four of my getting started with Snowflake series, where I work through time travel, role-based access controls, account administration, and secure data sharing. I show how to drop and undrop tables, roll back a deliberate DML mistake using time travel, set up a junior DBA role, and explore the account usage and data sharing features.

## Key takeaways

- Snowflake's time travel gives you 24 hours of historical access by default, extendable to 90 days on Enterprise Edition, letting you query data as it existed at a past point.
- You can recover from mistakes with UNDROP TABLE to restore a deleted table, or CREATE OR REPLACE TABLE ... BEFORE (statement => query_id) to roll a table back to before a bad update ran.
- Role-based access control works by granting permissions to roles rather than individual users, then assigning users to those roles, mirroring AWS-style group permissions.
- The account admin view exposes usage, billing, users, roles, network policies, resource monitors and reader accounts, with credits costing roughly two euros fifty each.
- Secure data sharing keeps a single live copy of data in the provider's account, so consumers always access real-time data without you losing custody of it.

## Chapters

- 0:00 Recap and what we'll cover
- 2:10 How Snowflake time travel works
- 3:55 Running Snowflake from VS Code
- 6:14 Drop and undrop a table
- 7:57 Rolling back a table with time travel
- 32:01 Role-based access controls and account admin
- 49:21 Account usage, billing and monitors
- 49:24 Secure data sharing and the marketplace

Watch the full video, read the transcript and use chapter deep-links on the page: https://just-tim.com/posts/getting-started-with-snowflake-pt-4-time-travel-security-and-data-shares

---
just-tim — Data and analytics, with a point of view. · https://www.youtube.com/channel/UC7HYxRWmaNlJux-X7rNLZyw · https://twitter.com/TableauTim · https://www.linkedin.com/in/timngwena
