Categories:

Information Schema , Table functions

DCM_DEPLOYMENT_HISTORY

This table function returns the deployment history for DCM project objects. You can use it to query successful and failed deployments, including timestamps, status, error details, and summary statistics. The function provides role-based access and low-latency results.

Syntax

DCM_DEPLOYMENT_HISTORY(
      [ PROJECT_NAME => '<string>' ]
      [, START_TIME_RANGE_START => <constant_expr> ]
      [, START_TIME_RANGE_END => <constant_expr> ]
      [, RESULT_LIMIT => <integer> ] )

Arguments

All arguments are optional.

PROJECT_NAME => 'string'

Fully qualified name of the DCM project. If not provided, the function returns history for all projects accessible by the current role.

START_TIME_RANGE_START => constant_expr

Timestamp (in TIMESTAMP_LTZ format) marking the start of the time range for retrieving deployment events.

Default: 7 days ago.

START_TIME_RANGE_END => constant_expr

Timestamp (in TIMESTAMP_LTZ format) marking the end of the time range for retrieving deployment events.

Default: current timestamp.

RESULT_LIMIT => integer

Maximum number of rows to return.

Default: 10000.

Output

The function returns the following columns:

Column nameData typeDescription
QUERY_UUIDVARCHARUnique identifier of the query that executed the deployment.
PROJECT_NAMEVARCHARName of the DCM project that was deployed.
START_TIMESTAMPTIMESTAMP_LTZTimestamp of when the deployment execution started.
END_TIMESTAMPTIMESTAMP_LTZTimestamp of when the deployment execution completed or failed.
DEPLOYMENT_NAMEVARCHARInternal deployment identifier (for example, DEPLOYMENT$1, DEPLOYMENT$2).
DEPLOYMENT_ALIASVARCHARUser-specified alias for the deployment. Empty if no alias was provided.
STATUSVARCHARStatus of the deployment. Possible values: EXECUTING, SUCCESSFUL, FAILED, CANCELED. EXECUTING indicates that the deployment is still in progress; the other values are terminal states.
PHASEVARCHARThe phase of the execution. Possible values: PLAN, DEPLOY, INIT.
CONFIGURATION_PROFILEVARCHARName of the configuration profile used for the deployment. Empty if no configuration was specified.
ERROR_MESSAGEVARCHARError message if the deployment failed. Empty for successful deployments.
ERROR_CODEVARCHARError code if the deployment failed. Empty for successful deployments.
DATABASE_NAMEVARCHARDatabase that contains the DCM project.
SCHEMA_NAMEVARCHARSchema that contains the DCM project.
EXECUTOR_ROLEVARCHARRole that executed the deployment command.
STATSVARIANTJSON object containing summary statistics of the deployment, broken down by category. Each category contains counts of created, altered, and dropped items. Categories include entities (managed objects), columns, grants, and dmfAttachments (data metric function expectations).

Usage notes

  • When calling an Information Schema table function, the session must have an INFORMATION_SCHEMA schema in use or the function name must be fully qualified. For more details, see Snowflake Information Schema.
  • This function returns deployments from the past 12 months only. There is no ACCOUNT_USAGE view equivalent for DCM deployment history.
  • Older deployments remain available as deployment artifacts stored inside the DCM project for as long as the project object exists. The artifacts (not this function) are the canonical long-term audit trail. For more information, see Monitor and troubleshoot DCM Projects.

Examples

Retrieve deployment history for a specific project, limited to 3 results:

SELECT
  PROJECT_NAME,
  START_TIMESTAMP,
  DEPLOYMENT_NAME,
  DEPLOYMENT_ALIAS,
  STATUS,
  CONFIGURATION_PROFILE,
  EXECUTOR_ROLE
FROM
  TABLE (MY_DB.INFORMATION_SCHEMA.DCM_DEPLOYMENT_HISTORY(
    project_name => 'MY_DB.PROJECTS.MY_PROJECT',
    result_limit => 3
  ));
+----------------+-----------------------------+--------------+------------------+------------+-----------------------+------------------+
| PROJECT_NAME   | START_TIMESTAMP             | DEPLOYMENT   | DEPLOYMENT       | STATUS     | CONFIGURATION_PROFILE | EXECUTOR_ROLE    |
|                |                             | _NAME        | _ALIAS           |            |                       |                  |
+----------------+-----------------------------+--------------+------------------+------------+-----------------------+------------------+
| MY_PROJECT     | 2026-03-20 09:15:22.254     | DEPLOYMENT$3 | staging update   | SUCCESSFUL | STAGE                 | PROJECT_DEPLOYER |
| MY_PROJECT     | 2026-03-19 14:30:10.927     | DEPLOYMENT$2 |                  | FAILED     | DEV                   | PROJECT_DEPLOYER |
| MY_PROJECT     | 2026-03-18 11:00:05.339     | DEPLOYMENT$1 | initial deploy   | SUCCESSFUL | DEV                   | PROJECT_DEPLOYER |
+----------------+-----------------------------+--------------+------------------+------------+-----------------------+------------------+

The STATS column contains a JSON object with the following structure:

{
  "columns": {
    "altered": 0,
    "created": 12,
    "dropped": 0
  },
  "dmfAttachments": {
    "altered": 0,
    "created": 2,
    "dropped": 0
  },
  "entities": {
    "altered": 1,
    "created": 5,
    "dropped": 0
  },
  "grants": {
    "altered": 0,
    "created": 4,
    "dropped": 0
  }
}

Retrieve all columns for all projects accessible by the current role within the last 24 hours:

SELECT *
FROM TABLE (INFORMATION_SCHEMA.DCM_DEPLOYMENT_HISTORY(
  start_time_range_start => DATEADD(hours, -24, CURRENT_TIMESTAMP())
));