We recommend creating a dedicated role for Cortex usage. This helps keep ingestion and AI access patterns separate, and ensures only the necessary permissions are granted for Cortex-related use cases.
SELECT on all tables and views referenced by the semantic view.
-- Create a new roleCREATEROLE<role_name>;-- Grant the new role to the Select Star userGRANTROLE<role_name>TO USER <select_star_user>;-- Grant usage on the database and schema where semantic views will be createdGRANT USAGE ONDATABASE<db_name>TOROLE<role_name>;GRANT USAGE ONSCHEMA<schema_name>TOROLE<role_name>;-- Grant the privilege to create semantic views in that schemaGRANTCREATE SEMANTIC VIEW ONSCHEMA<db_name>.<schema_name>TOROLE<role_name>;-- Grant select privileges on the underlying tables/views the semantic view will useGRANTSELECTONTABLEMY_DB.MY_SCHEMA.TABLE_A TOROLE<role_name>;GRANTSELECTONTABLEMY_DB.MY_SCHEMA.TABLE_B TOROLE<role_name>;
In the sidebar, select your Snowflake data source.
Click the Cortex Analyst tab.
Hit the Enable button.
Enable Cortext Analyst
You'll be prompted to provide:
Database Name: This is where your semantic views will be created.
Schema Name: This is the schema within that database where the semantic views will live.
Role: The role that has the necessary permissions to create semantic views and access the underlying tables.
3. Generate Semantic Views
Once Cortex Analyst is enabled, you can generate semantic views directly from the dashboard list page (for any data source) or the table list page (for Snowflake data sources only).
Show AI assist button
Go to the dashboards page.
Click the AI Assist button.
Select Generate Snowflake Semantic View.
A modal will appear, asking you to provide a Display Name and a Description for your semantic views.
Generate Semantic View
4. Leverage Semantic Views in Your Chatbot
Now that your semantic views are generated, they're automatically available to all users in your organization. They'll provide rich, relevant context for your chatbot, making interactions more informed and insightful.