We recommend creating a separate Snowflake user & role for Arcwise access to have better visibility and granular access management. (Itβs possible to skip to step 2 and provide an existing set of credentials instead).
(Optional) Allow connection from Arcwise IP address
If you need to add a fixed IP address to your allowlist or network policy, please refer to our Arcwise Fixed IP Address page.
Creating a new user/role
Weβve provided a script here to help with role and user creation. You can paste this directly into Snowsight if you have SYSADMIN or ACCOUNTADMIN privileges.
IMPORTANT
Take care to replace the highlighted values in the query below!
Make sure to execute all of the queries! Select the entire query text before running if using Snowsight, or check the βAll Queriesβ checkbox if using the legacy console.
By default, this will allow the Arcwise role to access all schemas in $database_name, but this can be restricted if preferred (see highlighted GRANT USAGE ON SCHEMA below). Be sure that each query runs successfully!
-- (Optional) Edit these if you prefer something else.SET role_name ='ARCWISE_ROLE';SET user_name ='ARCWISE_USER';-- (Optional) You can also use an existing warehouse if desired.SET warehouse_name ='ARCWISE_WAREHOUSE';-- Define a password for the Arcwise user (ideally randomly generated). Remember it for laterSET user_password ='<your-password-here>';-- Database you want to allow Arcwise to access and snapshot schema that-- will be created in that database for data snapshot managementSETdatabase_name='<your-database-here>';SET snapshot_schema_name ='_ARCWISE_SNAPSHOTS';-- Database setupCREATEDATABASEIFNOTEXISTS IDENTIFIER($database_name) COMMENT ='Arcwise database';-- Warehouse setupCREATE WAREHOUSE IFNOTEXISTS IDENTIFIER($warehouse_name) warehouse_size = small warehouse_type =standard auto_suspend =15 auto_resume = true initially_suspended = true;-- Role setupCREATEROLEIFNOTEXISTS IDENTIFIER($role_name) COMMENT ='Arcwise default role';-- User setupCREATEUSERIFNOTEXISTS IDENTIFIER($user_name)password= $user_password first_name ='Arcwise' last_name ='User' default_warehouse = $warehouse_name default_role = $role_name;-- Assign user -> roleGRANTROLE IDENTIFIER($role_name) TO USER IDENTIFIER($user_name);-- Allow role -> warehouse & databaseGRANT USAGE ON WAREHOUSE IDENTIFIER($warehouse_name) TOROLE IDENTIFIER($role_name);GRANT USAGE ONDATABASE IDENTIFIER($database_name) TOROLE IDENTIFIER($role_name);-- Allow role to access all schemas (and tables/views within the schema)GRANT USAGE ON ALL SCHEMAS INDATABASE IDENTIFIER($database_name) TOROLE IDENTIFIER($role_name);GRANT USAGE ON FUTURE SCHEMAS INDATABASE IDENTIFIER($database_name) TOROLE IDENTIFIER($role_name);-- (Optional) To restrict access to certain schemas: comment out the two lines above and edit below-- GRANT USAGE ON SCHEMA <your-database>.<your-schema> TO ROLE IDENTIFIER($role_name);GRANTSELECTON ALL TABLES INDATABASE IDENTIFIER($database_name) TOROLE IDENTIFIER($role_name);GRANTSELECTON FUTURE TABLES INDATABASE IDENTIFIER($database_name) TOROLE IDENTIFIER($role_name);GRANTSELECTON ALL VIEWS INDATABASE IDENTIFIER($database_name) TOROLE IDENTIFIER($role_name);GRANTSELECTON FUTURE VIEWS INDATABASE IDENTIFIER($database_name) TOROLE IDENTIFIER($role_name);-- Create snapshot schema and grant role ownership over that schemaSET arcwise_snapshots_schema = $database_name||'.'|| $snapshot_schema_name;CREATE SCHEMA IF NOT EXISTS IDENTIFIER($arcwise_snapshots_schema) COMMENT = 'Arcwise-operated schema for managing data snapshots';
GRANTOWNERSHIPONSCHEMA IDENTIFIER($arcwise_snapshots_schema) TOROLE IDENTIFIER($role_name) REVOKE CURRENT GRANTS;-- Allow Arcwise role to analyze query history & table usage activityGRANT IMPORTED PRIVILEGES ONDATABASE SNOWFLAKE TOROLE IDENTIFIER($role_name);
By default the above commands will not give the SYSADMIN role access to data managed by Arcwise. To have the Arcwise role inherit from SYSADMIN and therefore grant that role full access run the following command:
In Snowsight, you can hover over account menu in the bottom left and click Copy account URL; then remove the leading https:// and trailing .snowflakecomputing.com
Warehouse
Use the $warehouse_name value from the SQL query (e.g. ARCWISE_WAREHOUSE)
Database
Use the $database_name value from the SQL query.
Snapshot Schema
Use the $snapshot_schema_name value from the SQL query.
Username/Password
$user_name and $user_password from the SQL query.
All credentials are stored securely using bank-level (256-bit) encryption. Once you hit Save and the connection has been added, you can switch over to the βTablesβ tab to see all the tables that will be exposed in Arcwise.
If you get an error that the username/password didnβt work, please double check that the all queries in the βCreate a new user/roleβ script ran successfully.