Snowflake
The following setup allows Alvin to access your Snowflake's metadata and query history, without being able to touch the underlying data.
1. Create Alvin user and role
-- CREATE ALVIN ROLE
create role if not exists alvin_role;
-- ALLOW ALVIN ROLE ACCESS TO THE USAGE / ACCOUNT DATA
grant monitor usage on account to role alvin_role;
grant imported privileges on all schemas in database snowflake to role alvin_role;
-- Allow usage on warehouse
grant usage on warehouse compute_wh to role alvin_role;
-- CREATE ALVIN USER
create user if not exists alvin_user;
-- GRANT ALVIN ROLE TO ALVIN USER
grant role alvin_role to user alvin_user;
alter user alvin_user set password = 'password';2. Grant access to all databases of interest
grant usage,monitor on database {db} to role alvin_role;
grant usage,monitor on all schemas in database {db} to role alvin_role;
grant usage,monitor on future schemas in database {db} to role alvin_role;
grant references on future tables in database {db} to role alvin_role;
grant references on all tables in database {db} to role alvin_role;
grant references on future materialized views in database {db} to role alvin_role;
grant references on all materialized views in database {db} to role alvin_role;
grant references on future views in database {db} to role alvin_role;
grant references on all views in database {db} to role alvin_role;3. Whitelist Alvin IP (Optional)
Last updated

