Intelligence

Estimated reading: 13 minutes

7.1 Overview

Casabase Cube integrates with Snowflake Intelligence — Snowflake’s agentic, conversational AI platform — to let business users interact with cube data using natural language. Once configured, users can discover cubes, run OLAP queries, generate visualizations, troubleshoot issues, and even modify cube structures, all without writing SQL or navigating the application UI directly.

Snowflake Intelligence bridges the gap between the multidimensional data stored in Casabase Cube and the people who need it, empowering users to find answers independently and reducing their reliance on data teams.

What Is Snowflake Intelligence?

Snowflake Intelligence is a ready-to-use AI application with a conversational interface powered by Cortex Agents. It:

  • Understands questions in natural language
  • Performs analysis using structured and unstructured data
  • Generates trusted insights with full traceability to source data
  • Produces visualizations (bar, line, pie, scatter, area, heatmap, box plot, and more)
  • Respects all existing Snowflake governance controls (row-access policies, column-level security, RBAC)

Users access Snowflake Intelligence at https://ai.snowflake.com or through AI & ML → Agents in Snowsight.

7.2 What the Casabase Cube Agent Can Do

The Casabase Cube agent exposes cube capabilities as tools that Snowflake Intelligence’s orchestration layer can invoke:

CapabilityDescriptionExample Prompt
DiscoverList cubes with their dimensions, members, hierarchies, and formulas.“What cubes do I have?” / “Show me the hierarchies in PLAN”
QueryExecute OLAP queries using natural language. The agent translates your question into a POV string and calls QUERY_CUBE.“Show me revenue by entity for Q1” / “What is net income for FY25 by department?”
VisualizeGenerate charts (bar, line, pie, scatter, area, heatmap, etc.) from query results. Charts are interactive and editable.“Chart total expenses by month as a line graph”
CompareRun variance and comparison queries across scenarios, versions, or time periods.“Compare Budget vs Actual for Q3 revenue”
Search docsSearch the built-in Cortex Search knowledge base for how-to answers.“How do I set up time balance?”
DiagnoseGather cube configuration, recent errors, and system information for troubleshooting.“My query returns no data. Help me troubleshoot.”
Health checkValidate cube configuration and identify issues such as missing hierarchies or orphaned members.“Run a health check on my FIN_PLAN cube”
Add dimensionAdd a hierarchy from a source table via natural language.“Add a geography dimension from MY_DB.PUBLIC.GEO_DIM”
Browse tablesList and inspect consumer tables and their columns to identify potential dimension sources.“What tables are available in my FINANCE_DB schema?”
Search membersSearch for specific members within a hierarchy by name or alias.“Find all members containing ‘Marketing’ in the Account hierarchy”

7.3 How It Works with Casabase Cube Data

When a user asks a question in Snowflake Intelligence, the following workflow occurs:

  1. Intent recognition: The orchestration LLM interprets the user’s question and determines which tool(s) to call.
  2. Cube discovery: If needed, the agent retrieves cube metadata (dimensions, hierarchies, members) to understand what data is available.
  3. Query construction: For data questions, the agent builds a POV (Point of View) object specifying which members from each dimension to include, then calls QUERY_CUBE.
  4. Result processing: The agent receives the tabular results and either presents them directly, summarizes them in natural language, or generates a visualization.
  5. Refinement: Users can ask follow-up questions to drill down, pivot, or change the analysis. The agent maintains conversational context throughout.

Governance: All queries executed through Snowflake Intelligence respect Casabase Cube’s row-level security. If a user has security rules restricting them to specific entities or accounts, those restrictions apply to agent-generated queries identically to queries run through the Streamlit UI or direct SQL. The agent uses CURRENT_USER() context to enforce security.

7.4 Setting Up the Agent

Prerequisites

  • Casabase Cube installed and configured with at least one cube
  • A Snowflake warehouse available for the application
  • Cross-region inference enabled (recommended for best model availability)

Step 1: Grant Cortex Access

Grant the Cortex User role to the application so it can invoke LLM models:

GRANT DATABASE ROLE SNOWFLAKE.CORTEX_USER TO APPLICATION CASABASE_CUBE;

Step 2: Grant a Warehouse

The application needs a warehouse to execute queries generated by the agent:

GRANT USAGE ON WAREHOUSE COMPUTE_WH TO APPLICATION CASABASE_CUBE;

Step 3: Run AI Setup

Navigate to Admin → AI Setup in the Casabase Cube Streamlit app. This step creates the Cortex Search service that indexes the built-in knowledge base (documentation, formula reference, troubleshooting guides) so the agent can answer how-to questions.

Step 4: Create the Snowflake Intelligence Object

The Snowflake Intelligence object is an account-level object that manages which agents are visible to users. You only need one per account:

CREATE SNOWFLAKE INTELLIGENCE IF NOT EXISTS SNOWFLAKE_INTELLIGENCE_OBJECT_DEFAULT;

Grant visibility to users:

GRANT USAGE ON SNOWFLAKE INTELLIGENCE SNOWFLAKE_INTELLIGENCE_OBJECT_DEFAULT TO ROLE PUBLIC;

Step 5: Generate and Deploy the Agent

Click Generate Agent SQL on the Admin tab. This produces a CREATE AGENT statement that registers the Casabase Cube agent with all its tools (query, search, discover, diagnose, etc.). Copy and run the generated SQL in a Snowflake worksheet.

After creation, add the agent to the Snowflake Intelligence object so it appears in the agent list:

ALTER SNOWFLAKE INTELLIGENCE SNOWFLAKE_INTELLIGENCE_OBJECT_DEFAULT
  ADD AGENT <database>.<schema>.<agent_name>;

Step 6: Grant Access to Users

Assign application roles to the user roles that should interact with the agent:

-- For general users (query, discover, search)
GRANT APPLICATION ROLE CASABASE_CUBE.CUBE_PUBLIC TO ROLE analyst_role;

-- For administrators (full access including diagnostics and modifications)
GRANT APPLICATION ROLE CASABASE_CUBE.CUBE_ADMIN TO ROLE admin_role;

Users also need standard Snowflake privileges to access the agent:

-- Grant access to the agent's database and schema
GRANT USAGE ON DATABASE <agent_db> TO ROLE analyst_role;
GRANT USAGE ON SCHEMA <agent_db>.<agent_schema> TO ROLE analyst_role;
GRANT USAGE ON AGENT <agent_db>.<agent_schema>.<agent_name> TO ROLE analyst_role;

7.5 What Users Can Do in Snowflake Intelligence

Once the agent is deployed, business users can interact with their cube data conversationally. Below are detailed examples organized by use case.

Natural Language Data Queries

Users can ask questions about their data without knowing POV syntax, member names, or cube structure:

User PromptWhat the Agent Does
“What is total revenue for FY25?”Identifies the cube, maps “revenue” to an Account member, “FY25” to a Year member, and executes a query across all other dimensions at their top level.
“Show me operating expenses by department for Q3”Builds a POV with children of the Operating Expenses account, crosses with all Entity members at the department level, and filters to the Q3 period.
“What’s the profit margin for each region?”If a formula member exists for profit margin, the agent uses it; otherwise, it computes revenue minus expenses and divides by revenue across region members.
“Top 5 products by sales volume in January”Queries sales volume for all products in January, sorts descending, and returns the top 5.

Visualizations and Charts

Snowflake Intelligence automatically determines whether to show results as a table or chart based on the query type. Users can also request specific chart types:

  • Trend analysis: “Chart monthly revenue for the last 12 months” → line chart
  • Composition: “Show expense breakdown by category as a pie chart” → pie chart
  • Comparison: “Compare headcount across departments as a bar chart” → bar chart
  • Distribution: “Show the distribution of deal sizes” → box plot or histogram
  • Multi-measure: “Plot revenue and profit on the same chart by quarter” → dual-axis layered chart

Charts are interactive: users can ask the agent to modify colors, titles, axis labels, or chart type in follow-up messages. Charts can also be saved as Artifacts, which are persistent objects that can be revisited or shared without regenerating them.

Variance and Scenario Analysis

Because Casabase Cube supports multiple scenarios and versions, the agent can perform comparative analysis:

  • “Compare Budget vs Actual for all accounts in Q4”
  • “Show me the variance between Forecast and Actual revenue by entity”
  • “What is the year-over-year change in operating income?”
  • “Show working version vs final version for headcount”

Cube Exploration and Metadata

Users can explore the cube structure without needing to navigate the application:

  • “What cubes do I have access to?”
  • “What dimensions are in the FIN_PLAN cube?”
  • “List the top-level members of the Account hierarchy”
  • “What formulas are defined on the Account dimension?”
  • “Show me the children of ‘Total P&L’”
  • “What cube variables are set and what are their values?”

Troubleshooting and Diagnostics

Administrators can use the agent to diagnose issues:

  • “My query returns no data. What’s wrong?”
  • “Run a health check on the SALES cube”
  • “Show me recent errors from the audit log”
  • “Are there any orphaned members in the Entity hierarchy?”
  • “Which users have queried the PLAN cube in the last 7 days?”

Administrative Actions

With the CUBE_ADMIN role, the agent can perform modifications:

  • “Add a geography dimension from MY_DB.PUBLIC.GEO_TABLE with PARENT and CHILD columns”
  • “What tables in FINANCE_DB.PUBLIC could be used as a dimension source?”

Semantic Views and Cube Data (Advanced)

For organizations that want to extend their Snowflake Intelligence experience beyond the Casabase Cube agent, cube fact tables can also be exposed through Semantic Views. A semantic view defines business metrics, dimensions, and their relationships in a way that Cortex Analyst (the text-to-SQL engine within Snowflake Intelligence) can use to generate SQL queries.

When to Use a Semantic View

  • You want users to query cube data alongside non-cube data (e.g., join planning data with CRM or ERP tables)
  • You want to define custom metrics (e.g., calculated KPIs) that go beyond what cube formulas provide
  • You want to leverage Cortex Analyst’s verified query feature for predictable responses to common questions

Creating a Semantic View over Cube Data

Since Casabase Cube stores its data in standard Snowflake tables (the fact table referenced in cube configuration), you can create a semantic view that references this table directly:

CREATE OR REPLACE SEMANTIC VIEW MY_DB.ANALYTICS.PLANNING_SV
  COMMENT = 'Financial planning cube data with dimensional context'
AS SELECT * FROM TABLE(
  -- Define logical tables, dimensions, metrics, and relationships
  -- based on your cube fact table and hierarchy input tables
);

Tip: The cube’s fact table columns map directly to dimension names (e.g., ACCOUNT, ENTITY, PERIOD) and the AMT column holds the measure values. Hierarchy input tables (in CASABASE_CUBE.SHARED_DATA) provide parent-child relationships and aliases that enrich the semantic view.

Verified Queries

For common questions that users repeatedly ask, you can add verified queries to your semantic view. These are pre-validated SQL statements mapped to natural language questions, ensuring consistent and fast responses:

  • “What is total revenue?” → A verified SQL query that sums AMT where ACCOUNT = ‘Total Revenue’
  • “Show monthly expenses” → A verified query that groups by PERIOD with the correct Account filter

Verified queries bypass LLM SQL generation for known patterns, reducing latency and increasing predictability.

7.6 Governance and Security

Snowflake Intelligence inherits all existing Snowflake governance controls:

  • Role-based visibility: Only users with USAGE on the agent and the Snowflake Intelligence object can see and interact with the agent.
  • Restrict to Intelligence only: For users who should only access the conversational interface (not Snowsight), use:
    ALTER USER <username> SET ALLOWED_INTERFACES = (SNOWFLAKE_INTELLIGENCE);
  • Cortex access control: Revoke CORTEX_USER from PUBLIC and grant only to specific roles if you want to limit who can use AI features:
    REVOKE DATABASE ROLE SNOWFLAKE.CORTEX_USER FROM ROLE PUBLIC;
    GRANT DATABASE ROLE SNOWFLAKE.CORTEX_USER TO ROLE analyst_role;
  • Agent-specific access: Use the CORTEX_AGENT_USER role to allow only Snowflake Intelligence access without other Cortex features:
    GRANT DATABASE ROLE SNOWFLAKE.CORTEX_AGENT_USER TO ROLE <role_name>;

Mobile Access

Snowflake Intelligence is available as an iOS mobile app, allowing users to query their cube data on the go. The mobile app supports all the same capabilities: chat, agents, file attachments, voice input, citations, and role/warehouse selection.

Monitoring Agent Usage

Administrators can monitor how the agent is being used:

  • Agent monitoring tab: In Snowsight under AI & ML → Agents, view request logs including prompts, responses, latency, and errors.
  • Casabase audit log: All queries executed by the agent appear in the Casabase Cube audit log with full POV details.
  • User feedback: Users can provide thumbs-up/thumbs-down feedback on agent responses, visible in the monitoring interface.
  • Latency traces: The monitoring tab shows the logical path the agent took and how long each step lasted, helping identify bottlenecks.

7.7 Tips and Limitations

Tips for Best Results

  • Use specific member names: “Show me revenue for Corporate” works better than “show me some numbers”.
  • Reference dimensions explicitly: “Revenue by entity for Q1 FY25” is clearer than “Q1 numbers”.
  • Leverage cube variables: If your cube has variables like current_period, the agent can use them: “Show me revenue for the current period”.
  • Ask follow-ups: The agent maintains conversation context. After a result, ask “Now break that down by department” or “Chart that as a bar graph”.
  • Use aliases: The agent recognizes both member names and their aliases, so use whichever is natural.
  • Enable extended thinking: For complex analytical questions, toggle extended thinking in the chat window for more thorough responses (uses more time and tokens).
  • Enable cross-region inference: For the best model quality and availability, enable cross-region inference in your Snowflake account.

Example Conversation

Below is an example of a multi-turn conversation with the Casabase Cube agent in Snowflake Intelligence:

User: What cubes do I have?

Agent: You have 2 cubes configured:
  1. FIN_PLAN - Financial Planning (7 dimensions: Account, Entity,
     Period, Scenario, Version, Currency, Year)
  2. SALES - Sales Pipeline (5 dimensions: Product, Region, Quarter,
     Channel, Measure)

User: Show me total revenue by entity for Q1 in FIN_PLAN

Agent: Here are the Q1 revenue results by entity:
  | Entity      | Q1 Revenue  |
  |-------------|-------------|
  | Corporate   | $12,450,000 |
  | North America| $8,200,000 |
  | EMEA        | $3,100,000 |
  | APAC        | $1,150,000 |

User: Chart that as a bar graph

Agent: [Generates a horizontal bar chart showing Q1 revenue by entity]

User: Now compare that to Budget

Agent: Here is Q1 revenue by entity: Actual vs Budget
  | Entity       | Actual      | Budget      | Variance    | Var % |
  |--------------|-------------|-------------|-------------|-------|
  | Corporate    | $12,450,000 | $11,800,000 | $650,000    | 5.5%  |
  | North America| $8,200,000  | $8,500,000  | ($300,000)  | -3.5% |
  | EMEA         | $3,100,000  | $2,900,000  | $200,000    | 6.9%  |
  | APAC         | $1,150,000  | $1,400,000  | ($250,000)  | -17.9%|

User: Why might APAC be behind budget?

Agent: Based on the cube data, APAC is $250K (17.9%) behind budget in
  Q1. Looking at the Account breakdown for APAC in Q1, Product Revenue
  is on track but Services Revenue is significantly below plan.
  I'd recommend drilling into the Services line items for more detail.

Current Limitations

  • Geographic map charts are not supported by Snowflake Intelligence.
  • Very long conversations may lose earlier context due to the LLM’s finite context window. Start a new conversation for unrelated questions.
  • The agent cannot modify cube data directly.
  • File upload in Snowflake Intelligence is not available for Intelligence-only users (those restricted via ALLOWED_INTERFACES).
  • Response latency varies depending on query complexity, warehouse load, and LLM service availability. Most requests complete within 30-90 seconds.
Share this Doc

Intelligence

Or copy link

CONTENTS