Skip to main content

Deletion Prevention of PROD DB and SOLE User

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. Such a mechanism helps you protect your environment and avoid accidental deletions. This topic discusses the following:

Preventing the deletion of 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_BRANCH_NAME_PROD.

It is possible to disable this feature 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, we strongly recommend you don't disable this function unless necessary.

Preventing the deletion of 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 feature 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, we strongly recommend you don't disable this function unless necessary.