GRANT <PRIVILEGE>

statementnot supportedAccess control (grants, roles)

docs.snowflake.com ↗

Grants access privileges for databases and other supported database objects (schemas, UDFs, tables, views, and models) to a share. Granting privileges on these objects effectively adds the objects to the share, which can then be shared with one or more consumer accounts. For more details, see About Secure Data Sharing and Create and configure shares.

Syntax

GRANT objectPrivilege ON
     {  DATABASE <name>
      | SCHEMA <name>
      | FUNCTION <name>
      | MODEL <name>
      | SEMANTIC VIEW <name>
      | { TABLE <name> | ALL TABLES IN SCHEMA <schema_name> }
      | { EXTERNAL TABLE <name> | ALL EXTERNAL TABLES IN SCHEMA <schema_name> }
      | { ICEBERG TABLE <name> | ALL ICEBERG TABLES IN SCHEMA <schema_name> }
      | { DYNAMIC TABLE <name> | ALL DYNAMIC TABLES IN SCHEMA <schema_name> }
      | TAG <name>
      | VIEW <name>  }
  TO SHARE <share_name>

Where

objectPrivilege ::=
-- For DATABASE
   REFERENCE_USAGE [ , ... ]
-- For DATABASE, FUNCTION, MODEL, or SCHEMA
   USAGE [ , ... ]
-- For MODEL or TAG
   READ
-- For SEMANTIC VIEW
   { REFERENCES | SELECT } [ , ... ]
-- For TABLE
   EVOLVE SCHEMA [ , ... ]
-- For EXTERNAL TABLE, ICEBERG TABLE, TABLE, or VIEW
   SELECT [ , ... ]

Parameters

NameRequiredDescription
nameSpecifies the identifier for the object for which the specified privilege is granted.
schema_nameSpecifies the identifier for the schema for which the specified privilege is granted for all tables.
share_nameSpecifies the identifier for the share from which the specified privilege is granted.

Usage notes

See also

Referenced by