snow dcm commands

Note

To use DCM commands, you must enable the SNOWFLAKE_CLI_FEATURES_ENABLE_SNOWFLAKE_PROJECTS feature flag, using either of the following methods:

  • Set the SNOWFLAKE_CLI_FEATURES_ENABLE_SNOWFLAKE_PROJECTS environment variable to true before running the command.

  • Set the enable_snowflake_projects configuration option to true in the config.toml file, as shown in the following example:

    [cli.features]
    enable_snowflake_projects = true
    

Snowflake CLI supports the following commands for managing Snowflake DCM project objects:

Project configuration (manifest.yml)

DCM projects use a manifest.yml file to define project configuration. For more details, see DCM Projects files and templates.

Project identifier resolution

Most DCM commands accept an optional project identifier argument and a --target option. The project name is resolved as follows:

  1. If a project identifier is provided as an argument, it is used directly.

  2. If --target is specified, the project_name from that target in manifest.yml is used.

  3. If neither is provided, the default_target from manifest.yml is used.

Examples:

# Use default_target from manifest.yml
snow dcm deploy

# Use target from manifest.yml
snow dcm deploy --target DEV

# Explicit project name with fully qualified identifier
snow dcm deploy MY_DB.MY_SCHEMA.MY_PROJECT

The --from option specifies the directory containing the manifest.yml and project source files. If omitted, the current directory is used.

Note

Project identifiers can be specified as a fully qualified name (MY_DB.MY_SCHEMA.MY_PROJECT) or as a simple name (MY_PROJECT). When using a simple name, the database and schema are derived from the active connection context. Using fully qualified names is recommended to avoid ambiguity.