Snowflake
Steps to prepare and connect to Snowflake
Lightup account setup
Run the following SQL in a Snowflake database to prepare an account for Lightup.
- You must have at least the ACCOUNTADMIN role to set up new accounts.
- This SQL only grants access to one database. Consider creating a data warehouse for the databases you want to monitor, and then creating a Lightup login and role there.
- If you are connecting to an imported database, you must grant imported privileges on the database.
-- change role to ACCOUNTADMIN
use role ACCOUNTADMIN;
-- create role for lightup
create role if not exists lightup_role;
-- grant usage on warehouse
grant usage on warehouse compute_wh to role lightup_role;
-- grant access to data assets with the database
grant usage on database testdb to role lightup_role;
grant usage on all schemas in database testdb to role lightup_role;
grant usage on future schemas in database testdb to role lightup_role;
grant select on all tables in database testdb to role lightup_role;
grant select on future tables in database testdb to role lightup_role;
-- create user and assign to role
create user if not exists lightup_user password = 'redacted';
grant role lightup_role to user lightup_user;
alter user lightup_user set default_role = lightup_role;
alter user lightup_user set default_warehouse = compute_wh;
Configure connector
- Host - The account ID of the datasource, for example updwnz-cba54045. For help, see Snowflake's Account Identifiers.
- Database Name - The name of the database you're connecting to. Each datasource can only connect to one database. If you need to connect to more than one, you'll need to create a datasource for each.
- Username - Enter lightup_user.
- Password - The username account's password.
Optional settings
- Warehouse name - Specify a Snowflake warehouse for the connection. Read about Snowflake USE WAREHOUSE.
- Role - Specify a role to use for connecting. Read about Snowflake USE ROLE.
Advanced/Schema scan frequency
You can adjust how often scans run for a datasource.
- In section 3 - Advanced, select a value for Schema scan frequency: Hourly, Daily, or Weekly.
Query Governance
Snowflake datasources support all query governance features.
Date/time data types
These Snowflake date/time data types are supported:
- DATE
- TIMESTAMP_LTZ
- TIMESTAMP_NTZ
- TIMESTAMP_TZ
Object types
These Snowflake object types are supported:
- Tables
- Views
Updated 10 days ago