SHOW PACKAGES POLICIES¶
Lists packages policy information.
Syntax¶
SHOW PACKAGES POLICIES [ IN
{
SCHEMA |
SCHEMA <schema_name> |
<schema_name>
}
]
Parameters¶
[ IN ... ]
Optionally specifies the scope of the command. Specify one of the following:
SCHEMA
, .SCHEMA schema_name
, .schema_name
Returns records for the current schema in use or a specified schema (
schema_name
).SCHEMA
is optional if a database is in use or if you specify the fully qualifiedschema_name
(for example,db.schema
).If no database is in use, specifying
SCHEMA
has no effect on the output.
Output¶
The command output provides policy properties and metadata in the following columns:
Column |
Description |
---|---|
|
Date and time when the policy was created. |
|
Name of the policy. |
|
Database in which the policy is stored. |
|
Schema in which the policy is stored. |
|
The kind of policy. |
|
Role that owns the policy (i.e. has the OWNERSHIP privilege on the policy) |
|
Comment for the policy. |
|
The type of role that owns the object, for example |
Access control requirements¶
A role used to execute this SQL command must have at least one of the following privileges at a minimum:
Privilege |
Object |
Notes |
---|---|---|
OWNERSHIP |
Packages policy |
OWNERSHIP is a special privilege on an object that is automatically granted to the role that created the object, but can also be transferred using the GRANT OWNERSHIP command to a different role by the owning role (or any role with the MANAGE GRANTS privilege). |
USAGE |
Packages policy |
Also grants the ability to execute a SHOW or DESCRIBE command on the packages policy. Can be granted to a role using the GRANT <privileges> command. |
Note that operating on any object in a schema also requires the USAGE privilege on the parent database and schema.
For instructions on creating a custom role with a specified set of privileges, see Creating custom roles.
For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.
Usage notes¶
The command does not require a running warehouse to execute.
The value for
LIMIT rows
cannot exceed10000
. IfLIMIT rows
is omitted, the command results in an error if the result set is larger than 10K rows.To view results for which more than 10K records exist, either include
LIMIT rows
or query the corresponding view in the Snowflake Information Schema.
To post-process the output of this command, you can use the RESULT_SCAN function, which treats the output as a table that can be queried.
Example¶
SHOW PACKAGES POLICIES;