Log in to Snowflake. Using the ACCOUNTADMIN role, execute the following SQL:
-- Required for basic metadata & query history accesscreaterole selectstar_role;grant imported privileges ondatabase snowflake torole selectstar_role;createuserselectstarpassword='s313ctst8r' default_role='selectstar_role'type='LEGACY_SERVICE';grantrole selectstar_role to user selectstar;grant usage on warehouse MED to selectstar_role;
These are the minimum permissions required for Select Star to collect basic metadata and query history. Query history is also used to generate lineage.
2. Grant optional permissions
To enable Select Starβs Preview feature and access additional metadataβsuch as Primary Keys (PK) and Foreign Keys (FK) βyouβll need to grant the following permissions.
Using the ACCOUNTADMIN role, execute the following SQL for each database you want to ingest (example uses DWH as the database name):
If the latency of updates in ACCOUNT_USAGE is too high for your needs (see Snowflake documentation on data latency), you can switch to INFORMATION_SCHEMA instead, providing faster updates in the UI.
Enhanced Lineage for Dynamic Tables
To see lineage for dynamic tables, we recommend granting permission to read dynamic table definitions. Without this, lineage can only be inferred from query logs, which may not be fully reliable.
Using the ACCOUNTADMIN role, execute the following SQL for each database you want to ingest (example uses DWH as the database name):
If you're granting these permissions after your Snowflake metadata has already been synced, you'll need to re-sync it.
Go to Settings > Data
Click on Sync metadata on your Snowflake Data source.
3. Connect Snowflake to Select Star
Go to the Select Star Settings. Click Data in the sidebar, then + Add to create a new Data Source.
Choose Snowflake in the Source Type dropdown and provide the following information:
Display Name: This value is Snowflake by default, but you can override it if desired.
Account: The account name is the name to the left of snowflakecomputing.com when you log in to Snowflake.
Role: The role you granted the service account user. In the example above, it is selectstar_role
Warehouse: The name of the data warehouse you've given us access to. In the example above it is MED
Click Save and fill in the Authentication Details:
Authentication: Select Password.
Username: The name of the service account user you created. In the example above, it is selectstar
Password: The password for the service account user you created. In the example above, it is s313ctst8r
4. Choose databases and schemas
After you fill in the information, you'll be asked to select the databases you'd like to load into Select Star.
Select Star will not read queries or metadata or generate lineage for databases, schemas, or tables that are not loaded. Please load all data for which you expect to see lineage.
use role ACCOUNTADMIN;
grant usage on database DWH to role selectstar_role;
grant usage on all schemas in database DWH to role selectstar_role;
grant select on all tables in database DWH to role selectstar_role;
grant select on all views in database DWH to role selectstar_role;
grant usage on future schemas in database DWH to role selectstar_role;
grant select on future tables in database DWH to role selectstar_role;
grant select on future views in database DWH to role selectstar_role;
use role ACCOUNTADMIN;
grant usage on database DWH to role selectstar_role;
grant usage on all schemas in database DWH to role selectstar_role;
grant monitor on all dynamic tables in database DWH to role selectstar_role;
grant monitor on future dynamic tables in database DWH to role selectstar_role;