How to GRANT Permissions in Snowflake

Galaxy Glossary

How do I grant permissions to roles and users in Snowflake?

The GRANT command assigns object or role privileges to users or roles in Snowflake.

Sign up for the latest in SQL knowledge from the Galaxy Team!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

Description

Table of Contents

What does GRANT do in Snowflake?

GRANT hands specific privileges on databases, schemas, tables, or roles to users or roles so they can perform actions such as SELECT, INSERT, or OWNERSHIP.

How do I grant table-level privileges?

Run GRANT with a privilege list, the object type TABLE, and the target table name. Assign the privileges to a role or user.

GRANT SELECT, INSERT ON TABLE Orders TO ROLE analyst;

Can I grant privileges on all future tables?

Yes. Use the FUTURE keyword so every table created later inherits the privileges.

GRANT SELECT ON FUTURE TABLES IN SCHEMA sales TO ROLE reporting_role;

How do I pass along the ability to grant further?

Add WITH GRANT OPTION so the grantee can re-grant the same privileges.

GRANT SELECT ON TABLE Products TO ROLE lead_dev WITH GRANT OPTION;

How do I revoke unwanted access?

Use REVOKE with the same privilege list and object to remove access.

REVOKE INSERT ON TABLE Orders FROM ROLE intern;

Best practices for GRANT

Use roles, not users

Create functional roles (analyst, app_reader) and grant privileges to roles, then assign roles to users.

Keep roles minimal

Grant only the privileges required (principle of least privilege) to reduce security risk.

Document changes

Log every GRANT and REVOKE in version control or a change-management table for audits.

Common use cases

• BI teams need SELECT on reporting views.
• ETL jobs require INSERT on staging tables.
• Developers need TEMPORARY TABLE privilege in sandboxes.

Troubleshooting tips

Privilege errors often come from forgotten schema-level grants. Grant usage at both database and schema levels when needed.

Why How to GRANT Permissions in Snowflake is important

How to GRANT Permissions in Snowflake Example Usage


-- Allow the marketing app to read customer emails
GRANT SELECT (id, email)
ON TABLE Customers
TO ROLE marketing_app;

How to GRANT Permissions in Snowflake Syntax


GRANT { privilege [, ...] }
      ON [ FUTURE ] object_type [ IF EXISTS ] object_name | IN object_parent
      TO { ROLE role_name | USER user_name } [ WITH GRANT OPTION ];

-- Ecommerce examples
GRANT SELECT, INSERT ON TABLE Orders TO ROLE analyst;
GRANT USAGE ON DATABASE shop_db TO ROLE app_backend;
GRANT SELECT ON FUTURE TABLES IN SCHEMA shop_db.public TO ROLE bi_team;

Common Mistakes

Frequently Asked Questions (FAQs)

How do I check existing grants?

Query SHOW GRANTS or SHOW GRANTS ON TABLE Orders to view current privilege assignments.

Can I copy grants from one table to another?

Yes. Use SHOW GRANTS ON TABLE source_tbl, then dynamically build GRANT statements for the target.

Does GRANT impact running queries?

New privileges apply immediately. Active sessions may need to refresh their role with USE ROLE or reconnect.

Want to learn about other SQL terms?

Trusted by top engineers on high-velocity teams
Aryeo Logo
Assort Health
Curri
Rubie Logo
Bauhealth Logo
Truvideo Logo
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.