Schema:

ACCOUNT_USAGE

STORAGE_LIFECYCLE_POLICY_HISTORY view

This Account Usage view displays the aggregated execution history of storage lifecycle policies. This view shows historical data from the past 12 months, and only includes policy executions that have completed successfully or with failures. The view doesn’t include queued, currently executing, or cancelled policy executions.

Columns

Column name

Data type

Description

POLICY_DB

VARCHAR

The name of the database that contains the storage lifecycle policy.

POLICY_SCHEMA

VARCHAR

The name of the schema that contains the storage lifecycle policy.

POLICY_NAME

VARCHAR

The name of the storage lifecycle policy.

REF_ENTITY_DB

VARCHAR

The name of the database that contains the object that the storage lifecycle policy is attached to.

REF_ENTITY_SCHEMA

VARCHAR

The name of the schema that contains the object that the storage lifecycle policy is attached to.

REF_ENTITY_NAME

VARCHAR

The name of the object that the storage lifecycle policy is attached to.

REF_ENTITY_DOMAIN

VARCHAR

The domain (type) of the object that the storage lifecycle policy is attached to; for example, Table.

STATE

VARCHAR

The aggregated state of the storage lifecycle policy execution: SUCCEEDED or FAILED (completed executions only).

START_TIME

TIMESTAMP_LTZ

Earliest timestamp of when any task in the storage lifecycle policy execution started.

END_TIME

TIMESTAMP_LTZ

Latest timestamp of when any task in the storage lifecycle policy execution completed.

EXECUTION_RESULT

VARIANT

JSON object containing detailed results for each task type in the storage lifecycle policy execution. Each task type (EXPIRE, ARCHIVE, EXPIRE_ARCHIVE) includes: start_time (individual task start timestamp), end_time (individual task end timestamp), state (individual task status: SUCCEEDED or FAILED), task-specific results (rowsExpired, rowsArchived, rowsExpiredFromArchive as applicable), and error details (errorMessageCode and errorMessage when task fails).

POLICY_BODY

VARCHAR

The body of the storage lifecycle policy.

Usage notes

  • Latency for the view is up to one hour.

  • The view contains historical data for the past 12 months (one year).

  • The view only shows completed policy executions.