SNAPSHOT_POLICIES view¶
This Information Schema view provides information on snapshot policies.
列¶
列名称 |
数据类型 |
描述 |
|---|---|---|
SNAPSHOT_POLICY_NAME |
VARCHAR |
Name of the snapshot policy |
SNAPSHOT_POLICY_SCHEMA |
VARCHAR |
Schema that the snapshot policy belongs to. |
SNAPSHOT_POLICY_CATALOG |
VARCHAR |
Database that the snapshot policy belongs to. |
SCHEDULE |
VARCHAR |
Schedule for snapshot creation. |
EXPIRE_AFTER_DAYS |
NUMBER |
Days after snapshot creation when snapshot should be expired and automatically deleted. |
HAS_RETENTION_LOCK |
VARCHAR |
Indicates whether the policy includes a retention lock. Y if the policy has a retention lock; N otherwise. Retention lock protects snapshots from being deleted by anyone for the defined retention period. The retention lock also prevents the retention period from being decreased on the policy. |
OWNER |
VARCHAR |
Name of the role that owns the snapshot policy. |
OWNER_ROLE_TYPE |
VARCHAR |
Type of role that owns the snapshot policy. Account role or Database role. |
CREATED |
TIMESTAMP_LTZ |
Date and time when the snapshot policy was created. |
LAST_ALTERED |
TIMESTAMP_LTZ |
对象上次经 DML、DDL 或后台元数据操作修改的日期和时间。请参阅 使用说明。 |
COMMENT |
VARCHAR |
Comment for the snapshot policy. |
使用说明¶
视图的延迟时间最长可达 180 分钟(3 小时)。
对对象执行以下操作时,将更新 LAST_ALTERED 列:
DDL 操作。
DML 操作(仅适用于表)。即使 DML 语句不影响任何行,也会更新此列。
由 Snowflake 对元数据执行的后台维护操作。