Skip to content
This repository has been archived by the owner on Mar 17, 2024. It is now read-only.

Commit

Permalink
snowflake backup
Browse files Browse the repository at this point in the history
  • Loading branch information
3amyatin authored Jan 17, 2024
1 parent 0b7a6c4 commit 6348036
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions snowflake/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,31 @@ https://docs.snowflake.com/en/user-guide/snowsql

## Connections
https://docs.snowflake.com/en/user-guide/ecosystem-etl


## System Setup
https://docs.snowflake.com/en/sql-reference/parameters


## Backup
* https://docs.snowflake.com/en/user-guide/data-time-travel
* ➕ cloned objects are independent of each other
* SELECT ... AT|BEFORE TIMESTAMP|OFFSET|STATEMENT
* CREATE ... CLONE ... AT|BEFORE https://docs.snowflake.com/en/sql-reference/sql/create-clone
* UNDROP TABLE|SCHEMA|DATABASE ...

SHOW DATABASES HISTORY;

CREATE OR REPLACE TABLE MyTable_V2 CLONE MyTable;

CREATE SCHEMA mytestschema_clone_restore CLONE testschema BEFORE (TIMESTAMP => TO_TIMESTAMP(40*365*86400));



## Restore

### UNDROP
https://www.snowflake.com/blog/undrop-a-table-database-or-schema/
UNDROP TABLE <tablename>;
UNDROP SCHEMA <schema name>;
UNDROP DATABASE <db name>;

0 comments on commit 6348036

Please sign in to comment.