Snowflake-Labs/schemachange

Curious on the use case of SchemaChange and Terraform

ankitsr92 opened this issue · 5 comments

** What are you trying to accomplish? **
Decide between SchemaChange and Terraform Snowflake Provider for Snowflake Object Management

** What options have you tried so far ? **
Want to understand from Snowflake POV what is the use case where SchemaChange is usefull or Terraform is. Since both are managed by SnowflakeLabs and based on my understanding both can do the same job of managing Snowflake Objects so which one to choose and when.

Terraform Support alot of resources ( Snowflake Objects ) ex -: Integrations, Warehouses, Privilege Grants etc which SchemaChange can also deploy if we create files containing the SQL statement to create and update them. Isn't it?

Now the plus side of Terraform seems to provide is better State management i.e. upon changes or removal Terraform handles it automatically rather for schemachange I don't see any option to Rollback or Revoke changes. Example Privileges changes would invoke Terraform to revoke existing and apply new. Rather Schemachange would involve adding both Revoke and Grant Commands.

But I want to know if there are a good comparison between these two helping customers choose one or the other.

In addition, Snowflake is introducing new database change management tools as seen here.

If you throw that into the mix with Terraform, does that change if/when to use SchemaChange?

That video was tremendous. Thank you for that share.

In addition, Snowflake is introducing new database change management tools as seen here.

#255 may be of interest.

In addition, Snowflake is introducing new database change management tools as seen here.

If you throw that into the mix with Terraform, does that change if/when to use SchemaChange?

How to rename column or change column type in declarative approach? 🤔 It looks cool at first sight but it is not flexible compared to imperative approaches, where detailed control over the execution order and specific operations is sometimes necessary.

@ankitsr92

schemachange is a database change management utility to take the state of a database from one version to the next.

Terraform started out and is primarily a infrastructure management utility beyond snowflake and schemachange.

The question to use Terraform vs. schemachange is an apples to oranges choice. This is how I see the decision tree.

Do you have multiple infrastructure that is or can be managed by Terraform, if yes then leverage terraform for provisioning account level objects upto empty databases.

Within a database, you want more control over how the schema and schema level objects are maintained. Use schemachange or any programmatic way to control the execution of your SQL statements.

You also have to compliment the use of schemachange and/or terraform with the CI/CD tooling, development lifecycle, release management and ownership of objects as well.

Hope this helps

cc: @afeld