Skip to content

mariusndini/Snowflake-db-copy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Snowflake-db-copy

Snowflake stored procedure to copy data from one DB to another DB

Stored Procedure is intended to copy data from source DB/Schema into target DB/Schema within Snowflake. Please be mindful that stored procedure will create materalized views. Logic will only copy tables currently and not views. MVs also cannot reference views.

SHARE_MV_CREATE(DB_SRC STRING, SCHEMA_SRC STRING, DB_DEST STRING, SCHEMA_DEST STRING)

Please note the above input params:

DB_SRC Named source database to grab tables from.

SCHEMA_SRC Named source Schema to use to grab tables from

DB_DEST Named destination database to land tables in

SCHEMA_DESTNamed destination schema to land tables in

Please note that the s.proc will utilize create SCHEMA if not exists (for DB as well) as to avoid errors. Could have implications but most likely not.

Please also note: This codebase is not supported/maintained in any way shape or form. You are to use this at your own risk.

About

Snowflake stored procedure to copy data from one DB to another DB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors