Skip to main content

grants_to

Creates, updates, deletes, gets or lists a grants_to resource.

Overview

Namegrants_to
TypeResource
Idsnowflake.grant.grants_to

Fields

NameDatatypeDescription
created_onstring
grant_optionbooleanCan grantee pass this privilege down?
granted_by_namestringThe role that granted this privilege to this grantee
granted_by_role_typestringType of role that granted this privilege to this grantee
grantee_namestringSpecific name of object being granted to
grantee_typestringEntity type being granted to
privilegesarrayPrivilege type
securable_namestringName of specific object granted on (not name of privilege!)
securable_typestringType of object granted on

Methods

NameAccessible byRequired ParamsDescription
list_grants_toSELECTgranteeName, granteeType, endpointList the roles and privileges granted to the specified grantee using the output of SHOW GRANTS TO

SELECT examples

List the roles and privileges granted to the specified grantee using the output of SHOW GRANTS TO

SELECT
created_on,
grant_option,
granted_by_name,
granted_by_role_type,
grantee_name,
grantee_type,
privileges,
securable_name,
securable_type
FROM snowflake.grant.grants_to
WHERE granteeName = '{{ granteeName }}'
AND granteeType = '{{ granteeType }}'
AND endpoint = '{{ endpoint }}';