Questions about Snowflake asked by my Students on Udemy (Q26-Q30)
These are all real-life questions I’ve been asked by students of my Udemy courses about Snowflake. My previous last post from this ongoing series: Questions about Snowflake asked by my Students on Udemy (Q21-Q25).
[Q26] How would you write a Snowflake Scripting (or any other language) script to make a copy of a shared database? I’d essentially like to make a hard copy of everything in a share. I’m not certain this is something anyone can do, but figured, of all people, maybe you could figure it out.
In “Snowflake Cost Optimization Techniques” I describe how I once did this, with a large schema from the shared samples, and just be aware that creating physical copies like this — the way we used to do it in other relational databases — is a bad practice in Snowflake and may cost you money. Try rather to always access data from where it is, and create zero-copy clones, apply row access policies and column masking policies.
However, if you still want to do this, beware first that you cannot share further a shared database. And you also have the option to replicate a database between accounts.