Connect Snowflake
Snowflake requires a dedicated role with warehouse USAGE, database access, and read permissions on tables and views.
Create a dedicated role
A role defines what Unity Layer can do. Create unitylayer_role to isolate and audit permissions.
CREATE OR REPLACE ROLE unitylayer_role;Grant warehouse access
Unity Layer needs a warehouse to run queries. Replace COMPUTE_WH with your warehouse name.
GRANT OPERATE, USAGE ON WAREHOUSE "COMPUTE_WH" TO ROLE unitylayer_role;Grant database and schema access
Grant USAGE on the database and schemas, including future schemas. Replace LIBRARY with your database.
GRANT USAGE ON DATABASE "LIBRARY" TO ROLE unitylayer_role;
GRANT USAGE ON ALL SCHEMAS IN DATABASE "LIBRARY" TO ROLE unitylayer_role;
GRANT USAGE ON FUTURE SCHEMAS IN DATABASE "LIBRARY" TO ROLE unitylayer_role;Grant read permissions
Grant SELECT on tables, views, streams, and dynamic tables.
-- Select Permissions (Read Access)
GRANT SELECT ON ALL TABLES IN DATABASE "LIBRARY" TO ROLE unitylayer_role;
GRANT SELECT ON FUTURE TABLES IN DATABASE "LIBRARY" TO ROLE unitylayer_role;
GRANT SELECT ON ALL EXTERNAL TABLES IN DATABASE "LIBRARY" TO ROLE unitylayer_role;
GRANT SELECT ON FUTURE EXTERNAL TABLES IN DATABASE "LIBRARY" TO ROLE unitylayer_role;
GRANT SELECT ON ALL STREAMS IN DATABASE "LIBRARY" TO ROLE unitylayer_role;
GRANT SELECT ON FUTURE STREAMS IN DATABASE "LIBRARY" TO ROLE unitylayer_role;
GRANT SELECT ON ALL DYNAMIC TABLES IN DATABASE "LIBRARY" TO ROLE unitylayer_role;
GRANT SELECT ON FUTURE DYNAMIC TABLES IN DATABASE "LIBRARY" TO ROLE unitylayer_role;Grant references permissions
Required when views depend on underlying tables.
GRANT REFERENCES ON ALL TABLES IN DATABASE "LIBRARY" TO ROLE unitylayer_role;
GRANT REFERENCES ON FUTURE TABLES IN DATABASE "LIBRARY" TO ROLE unitylayer_role;
GRANT REFERENCES ON ALL EXTERNAL TABLES IN DATABASE "LIBRARY" TO ROLE unitylayer_role;
GRANT REFERENCES ON FUTURE EXTERNAL TABLES IN DATABASE "LIBRARY" TO ROLE unitylayer_role;
GRANT REFERENCES ON ALL VIEWS IN DATABASE "LIBRARY" TO ROLE unitylayer_role;
GRANT REFERENCES ON FUTURE VIEWS IN DATABASE "LIBRARY" TO ROLE unitylayer_role;Monitor dynamic tables (optional)
Enterprise feature to check dynamic table refresh status.
GRANT MONITOR ON ALL DYNAMIC TABLES IN DATABASE "LIBRARY" TO ROLE unitylayer_role;
GRANT MONITOR ON FUTURE DYNAMIC TABLES IN DATABASE "LIBRARY" TO ROLE unitylayer_role;Grant imported privileges (optional)
Allows access to Snowflake-provided metadata.
GRANT IMPORTED PRIVILEGES ON DATABASE SNOWFLAKE TO ROLE unitylayer_role;Create a user and assign the role
Create unitylayer_user and assign unitylayer_role as the default role.
CREATE OR REPLACE USER unitylayer_user
DISPLAY_NAME = 'UNITYLAYER'
PASSWORD = '<your_secure_password>'
DEFAULT_ROLE = unitylayer_role
DEFAULT_WAREHOUSE = 'COMPUTE_WH';
GRANT ROLE unitylayer_role TO USER unitylayer_user;Verify the role
Confirm unitylayer_role appears in SHOW ROLES.
SHOW ROLES LIKE 'UNITYLAYER_ROLE';When setup is complete, open Connect database in the data catalog to enter credentials and test the connection.