Connection

x

x

x

In the below query, replace the names accordingly and run for each Schema:

-- Read-only access to specific schemas and warehouse (CHANGE THIS) 
set schema_name = 'DATABASE_NAME.SCHEMA_NAME'; 
set warehouse_name = 'WAREHOUSE_NAME';
grant USAGE on database identifier($database_name) to role identifier($PDQ_ROLE);
grant USAGE on schema identifier($schema_name) to role identifier($PDQ_ROLE);
grant USAGE on warehouse identifier($warehouse_name) to role identifier($PDQ_ROLE); 
grant SELECT on all tables in schema identifier($schema_name) to role identifier($PDQ_ROLE); 
grant SELECT on future tables in schema identifier($schema_name) to role identifier($PDQ_ROLE); 
grant SELECT on all views in schema identifier($schema_name) to role identifier($PDQ_ROLE); 
grant SELECT on future views in schema identifier($schema_name) to role identifier($PDQ_ROLE);
grant imported privileges on database snowflake to $PDQ_ROLE

Last updated

Was this helpful?