Skip to main content

Production Database and SOLE User Deletion Prevention

By default, the SOLE COMPILE and PLAN jobs fail to prevent deleting the production database or altering/deleting the user that connects SOLE to Snowflake. This topic discusses the following:

How to Prevent Deleting the Production Database

SOLE can accidentally delete a database in the production (PROD) environment if the corresponding configuration is removed or commented out. Deleting the production database can negatively affect pipeline runs and/or other environments. As a result, SOLE fails the PLAN job to prevent the PROD database from accidentally being deleted if it detects that the configuration specifies that it should delete the PROD database.

This feature is only implemented in the PROD environment (main branch).

If your project has another branch as its PROD environment, you can store this branch name in the environment variable DATAOPS_ENV_NAME_PROD.

Lastly, you can override (or disable) the delete prevention function by setting the variable DATAOPS_SOLE_OVERRIDE to any value. However, we strongly recommend you don't disable this feature unless necessary.

How to Prevent Deleting the Default SOLE User

SOLE does not manage the user required to connect to Snowflake. Therefore, if a configuration for this user is found, the COMPILE job fails to prevent accidentally updating the user's password or deleting the user.

It is possible to disable this function by setting the variable DATAOPS_SOLE_OVERRIDE to any value.

danger

Setting the variable DATAOPS_SOLE_OVERRIDE may lead to deleting critical Snowflake objects such as PROD databases and the default SOLE user. Therefore, a value must only be set if necessary.