Skip to main content

NOTE: Any Genesis Data Agent with the Database Tools will be able to access this data, and when such an agent is deployed to Slack, some agents may be accessible by all Slack users, unless they are configured by Eve to only be usable by select Slack users.So grant data in this manner only to non-sensitive data that is ok for any Slack user to view, or first have Eve limit the access to the Database Tools-enabled agents to only select users on Slack.
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)
Copy the code below & run it in a Snowflake Snowsight worksheet.
In the worksheet, ensure that the APP_DATABASE parameter is set to the correct Genesis Data Agents application name. Set the role, context, and warehouse before creating the stored procedure. The procedure accepts the application name (APP_NAME) and database name (database_name) as parameters. It will find all of the schemas that exist in the database, excluding the INFORMATION_SCHEMA schema, and loop through each, granting the following privileges to the Genesis Data Agents application:
  • 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.
The stored procedure is meant to help grant the Genesis Data Agents application access to appropriate data in your Snowflake account. However, it can be modified, as necessary, to include or exclude specific schemas, objects, etc.

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:
Next Steps: Once granted, Genesis will automatically start to catalog this data so you can use it with Genesis agents. The data will become available in the agent interfaces within a few minutes. Application Name: GENESIS_DATA_AGENTS - This is the name of your Genesis application instance that will receive the grants.