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¶
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_exprTimestamp (in TIMESTAMP_LTZ format) marking the start of the time range for retrieving deployment events.
Default: 7 days ago.
START_TIME_RANGE_END => constant_exprTimestamp (in TIMESTAMP_LTZ format) marking the end of the time range for retrieving deployment events.
Default: current timestamp.
RESULT_LIMIT => integerMaximum number of rows to return.
Default:
10000.
Output¶
The function returns the following columns:
| Column name | Data type | Description |
|---|---|---|
QUERY_UUID | VARCHAR | Unique identifier of the query that executed the deployment. |
PROJECT_NAME | VARCHAR | Name of the DCM project that was deployed. |
START_TIMESTAMP | TIMESTAMP_LTZ | Timestamp of when the deployment execution started. |
END_TIMESTAMP | TIMESTAMP_LTZ | Timestamp of when the deployment execution completed or failed. |
DEPLOYMENT_NAME | VARCHAR | Internal deployment identifier (for example, DEPLOYMENT$1, DEPLOYMENT$2). |
DEPLOYMENT_ALIAS | VARCHAR | User-specified alias for the deployment. Empty if no alias was provided. |
STATUS | VARCHAR | Status of the deployment. Possible values: EXECUTING, SUCCESSFUL, FAILED, CANCELED. EXECUTING indicates that the deployment is still in progress; the other values are terminal states. |
PHASE | VARCHAR | The phase of the execution. Possible values: PLAN, DEPLOY, INIT. |
CONFIGURATION_PROFILE | VARCHAR | Name of the configuration profile used for the deployment. Empty if no configuration was specified. |
ERROR_MESSAGE | VARCHAR | Error message if the deployment failed. Empty for successful deployments. |
ERROR_CODE | VARCHAR | Error code if the deployment failed. Empty for successful deployments. |
DATABASE_NAME | VARCHAR | Database that contains the DCM project. |
SCHEMA_NAME | VARCHAR | Schema that contains the DCM project. |
EXECUTOR_ROLE | VARCHAR | Role that executed the deployment command. |
STATS | VARIANT | JSON 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:
The STATS column contains a JSON object with the following structure:
Retrieve all columns for all projects accessible by the current role within the last 24 hours: