DESCRIBE SNAPSHOT POLICY¶

Describes a specific snapshot policy.

DESCRIBE can be abbreviated to DESC.

See also:

CREATE SNAPSHOT POLICY, ALTER SNAPSHOT POLICY, DROP SNAPSHOT POLICY, SHOW SNAPSHOT POLICIES

Syntax¶

DESC[RIBE] SNAPSHOT POLICY <name>
Copy

Parameters¶

name

Specifies the identifier for the snapshot policy to describe. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive.

Usage notes¶

  • To post-process the output of this command, you can use the pipe operator (->>) or the RESULT_SCAN function. Both constructs treat the output as a result set that you can query.

    The output column names for this command are generated in lowercase. If you consume a result set from this command with the pipe operator or the RESULT_SCAN function, use double-quoted identifiers for the column names in the query to ensure that they match the column names in the output that was scanned. For example, if the name of an output column is type, then specify "type" for the identifier.

Note

The snapshot policy is an object that’s inside a specific schema and database. Therefore, the policy gets replicated, dropped or undropped, and so on, when those operations are performed on the schema and database that contain it. If you can’t drop the snapshot policy because it’s associated with any snapshot sets, then you also can’t drop the schema or database containing the policy.

To determine whether a snapshot policy is associated with any snapshot sets, use the SHOW SNAPSHOT SETS command.

Output¶

Column

Description

created_on

Timestamp snapshot policy was created.

name

Name of snapshot policy.

database_name

Name of database that contains the snapshot policy.

schema_name

Name of schema that contains the snapshot policy.

owner

Name of the role with the OWNERSHIP privilege on the snapshot policy.

comment

Comment for snapshot policy.

schedule

Schedule for snapshot creation.

expire_after_days

Number of days after snapshot creation when snapshot expires.

has_retention_lock

Indicates whether the policy includes a retention lock.

Y if policy has retention lock; N otherwise.

For more information, see Retention lock.

owner

Name of the role with the OWNERSHIP privilege on the snapshot set.

owner_role_type

Type of role with the OWNERSHIP privilege on the snapshot policy.

Examples¶

Describe a snapshot policy:

DESC SNAPSHOT POLICY my_snapshot_policy;
Copy