Enterprise use cases for DCM Projects¶
This topic covers how to use DCM Projects in enterprise environments, such as managing multiple projects, working with multiple environments, and collaborating on projects.
When to use multiple DCM projects¶
When deciding if and how to split a DCM project into multiple projects, consider ownership and templating.
Ownership¶
Each project has one owner role that can deploy all defined objects. Grants allow granular access management for individual objects inside the project. However, if different groups of users are responsible for deploying changes to a project, it generally makes sense to split a DCM project accordingly.
The following is an example scenario:
The platform administrator deploys a database and a warehouse, creates the team administrator role, and grants CREATE privileges to the team administrator for a defined set of object types inside that database, as well as access to a defined set of account-level integrations.
The team administrator can now decide how to organize schemas and dynamic tables inside that database, fine-tune refresh frequencies, and grant more granular read access to individual team members.
The following is a solution:
The platform administrator deploys the high-level infrastructure for the team and grants the team administrator the privilege to create DCM project projects inside their database.
The team administrator can now also benefit from DCM Projects by creating one or more projects inside the team database to manage tables and grants to team members.
Template variables¶
If a DCM project defines a range of objects that are and should remain mostly similar, it is generally more convenient to define them once as parameterized template.
The following is an example scenario:
The platform team deploys a database for each regional team in the organization.
New regions are expected to be added over time.
All regions require mostly the same setup of schema, landing tables, roles, and warehouse.
Changes in this database template should be applied to all teams, for example, adding a read-only role.
The following is a solution:
You can execute a single set of definitions in a loop for each regional team listed in the manifest profile.
When more elements of this template start to diverge and the number of templating conditions increases, it can become easier to read and maintain separate DCM projects with their individual object definitions.
Use DCM Projects with multiple environments¶
The following diagram shows a typical workflow for deploying a DCM project to multiple environments.
Separate accounts vs. separate databases¶
Snowflake generally recommends setting up each environment as a separate Snowflake account. This ensures complete separation of production infrastructure from any experimental development and and guarantees restricted developer access to production data.
However, with careful access management, you can successfully manage multiple environments on one Snowflake account. This is easier when the databases are clearly separated and can become more challenging when account-level objects and integrations are involved.
The benefit of a single-account setup is the ability to easily clone production infrastructure and data for testing alterations before deploying those changes to production. However, copying parts of production data and infrastructure to a different account, for example, through org-internal data shares, can be more costly.
Impact on DCM project templating¶
Distinct object names for each environment are a requirement for single-account setups, for example, to keep EMEA_DB and EMEA_ADMIN
separate from EMEA_DB_DEV and EMEA_ADMIN_DEV. Snowflake also recommends this practice for multi-account setups. Templated names
allow for multiple instances of entities like EMEA_DB_DEV_JOHN and EMEA_DB_DEV_MARY to coexist for independent development and to
quickly create and destroy sandbox environments to test different solutions.
This applies to all account-level objects, such as databases, roles, and warehouses. You then need to apply these templated names to all fully qualified names of nested objects.