In order to take full advantage of the Genesis Data Agents, you must allow them access to specific objects in your Snowflake account. Click on the “Grant Data Access” page in the side menu to open up a set of helper scripts. The scripts will create a stored procedure that accepts a database name and Genesis Data Agents name as arguments and will grant SELECT access to all tables and views in all schemas of that database. The procedure will be created in the GENESIS_LOCAL_DB.SETTINGS schema, which was created as a part of the installation and configuration process.
Complete Setup Script
Run this complete script in a Snowflake worksheet to set up the grant procedure and grant access to your databases. The script includes:- Creation of the helper procedure
- Commands to grant access to local databases
- Commands for shared databases (commented out)
- Commands for SNOWFLAKE database access (commented out)
- USAGE on the database
- USAGE on each schema
- SELECT on all tables in each schema
- SELECT on all views in each schema
Granting privileges to the Genesis Data Agents application does not provide the Genesis provider access to your data or metadata. Only the Genesis Data Agents application will be able to take advantage of the privileges granted.
Individual Grant Scenarios
Option 1: Grant Access to Local Databases
After running the setup script above, use this command to grant access to a specific database. Replace<your db name> with the name of your database (case-sensitive).
Option 2: Grant Access to Shared Databases
If you want to grant data that has been shared to you via Snowflake data sharing, use this process instead:- First run
show shares;to see available shares - Then uncomment and modify the grant command below
- Replace
<inbound_share_db_name>with your share name
Option 3: Grant Access to SNOWFLAKE Database
To grant access to the SNOWFLAKE share (Account Usage, Organization Usage, etc.), uncomment and run this command:GENESIS_DATA_AGENTS - This is the name of your Genesis application instance that will receive the grants.
