marcin2x4
marcin2x4

Reputation: 1429

Migrate schema's specific objects between dbs in Snowflake

My ARCHIVE db in Snowflake already has SCHEMA_X. Few days ago new objects got added to SCHEMA_X in PROD db. What would be good practice to move only new/changed objects rather then entire schema to ARCHIVE db?

My plan is as follows:

  1. SQL query to define new elements in PROD db.
  2. SQL query to compare existing objects in both schemas for differences.
  3. Clone results from above points to ARCHIVE

Any one has more automated approach maybe?

Upvotes: 0

Views: 237

Answers (2)

Biraja Mohanty
Biraja Mohanty

Reputation: 196

Clone the entire schema that should be quick and upto date. Note- Cloning does not clones external tables n internal stages.

Upvotes: 2

MMV
MMV

Reputation: 980

I would say entire schema is better - because problems start when on top of adding objects you would end up modifying for example. If you're only storing the structure, not the data itself, the space needed to store that is pretty much none compared to the actual data (unless you end up changing the schema every 10 minutes)

Upvotes: 1

Related Questions