Integration Points
Casabase Cube is designed to integrate through Snowflake-native interfaces.
There is no Casabase-specific driver, XMLA endpoint, gateway, or separate middleware service to deploy. If a tool can connect to Snowflake, it can consume Casabase Cube through one of the supported integration surfaces.
The appropriate integration pattern depends on whether the consumer needs:
- relational leaf-level data
- full multidimensional calculation semantics
- repeatedly consumed materialized results
- natural-language or AI access
Integration Architecture
Section titled “Integration Architecture”At a high level:
Casabase Cube │ ├── Secure Views │ ├── Materialized Reporting Tables │ ├── Query Procedures │ └── AI Interfaces │ ▼Snowflake │ ▼Consuming ToolThe supported consumption surfaces include:
QUERY_CUBEQUERY_CUBE_PIVOT_JSON
<CUBE>_FACT_SECURE<CUBE>_DIMENSIONS
SHARED_DATA reporting tables
Cortex AgentMCP serverThese are the interfaces applications should build against rather than application-internal objects.
Four Integration Patterns
Section titled “Four Integration Patterns”Casabase Cube supports four primary integration patterns:
| Pattern | Surface | Best Fit |
|---|---|---|
| 1. Secure views | <CUBE>_FACT_SECURE, <CUBE>_DIMENSIONS |
Tool needs tables or views and will model in the consuming layer |
| 2. Materialized reporting tables | Scheduled Saved Queries → SHARED_DATA |
Tool cannot call procedures or the same result is read repeatedly |
| 3. Live procedure call | CALL + RESULT_SCAN |
Tool supports multi-statement SQL and needs full cube semantics |
| 4. AI / conversational | Cortex Agent, MCP server | Natural-language and AI-based access |
These four patterns form the primary integration architecture.
Choosing the Right Pattern
Section titled “Choosing the Right Pattern”A useful decision flow is:
Need Cube-Calculated Values? │ ├── No │ │ │ ▼ │ Secure Views │ └── Yes │ ▼Can the Tool Call Procedures? │ ┌─────┴─────┐ │ │ Yes No │ │ ▼ ▼CALL + MaterializedRESULT_SCAN Reporting TableFor natural-language access:
Natural-Language / AI Consumer │ ▼ Cortex Agent or MCPThe key distinction is whether the consuming tool needs the cube calculation engine or only the underlying relational data.
Pattern 1: Secure Views
Section titled “Pattern 1: Secure Views”Each cube exposes two primary secure views:
<CUBE>_FACT_SECURE<CUBE>_DIMENSIONSTogether they provide a conventional relational model suitable for BI tools and SQL consumers.
Secure Fact View
Section titled “Secure Fact View”The fact view contains:
One column per dimension+AMTFor example:
ACCOUNTENTITYPRODUCTPERIODSCENARIOAMTIt exposes the stored fact-level data permitted to the current user.
Secure Dimension View
Section titled “Secure Dimension View”The dimension view contains hierarchy metadata for all cube dimensions, distinguished by:
DIM_NAMEMetadata includes concepts such as:
- Member
- Parent
- Alias
- Generation
- Level
- Leaf status
- Sort order
- UDA
- Time-balance metadata
A BI model can separate this into individual dimension tables if desired.
Example Relational Query
Section titled “Example Relational Query”For example:
SELECT d.PARENT AS product_group, f.PRODUCTS, SUM(f.AMT) AS unitsFROM CASABASE_CUBE.SHARED_DATA.ASOSAMP_FACT_SECURE fJOIN CASABASE_CUBE.SHARED_DATA.ASOSAMP_DIMENSIONS d ON d.DIM_NAME = 'PRODUCTS' AND d.CHILD = f.PRODUCTSWHERE f.MEASURES = 'Units' AND f.YEARS = 'Curr Year' AND d.ISLEAFGROUP BY d.PARENT, f.PRODUCTSORDER BY units DESC;This is ordinary Snowflake SQL over the supported secure views.
BI Star-Schema Pattern
Section titled “BI Star-Schema Pattern”For a BI semantic model, individual dimension views can be created from <CUBE>_DIMENSIONS.
For example:
CREATE OR REPLACE VIEW MY_DB.BI.DIM_PRODUCTS ASSELECT CHILD AS PRODUCT, PARENT, ALIAS, GENERATION, LEVEL, ISLEAF, SORTORDERFROM CASABASE_CUBE.SHARED_DATA.ASOSAMP_DIMENSIONSWHERE DIM_NAME = 'PRODUCTS';The resulting BI model can look like:
DIM_ACCOUNT ─────┐DIM_ENTITY ──────┤DIM_PRODUCT ─────┼── FACT_SECUREDIM_PERIOD ──────┤DIM_SCENARIO ────┘This gives conventional star-schema behavior to tools that prefer relational semantic models.
Secure View Tradeoff
Section titled “Secure View Tradeoff”Secure views provide:
Stored facts+Hierarchy metadata+Row-level securityThey do not reproduce the Casabase Cube calculation engine.
Specifically, direct use of the views does not provide:
- Member formulas
- Calculated members
- Cube hierarchy aggregation semantics
- Time-balance processing
The consuming application performs its own calculations.
The authoritative guide summarizes the distinction as:
Calculation Engine Secure Views-------------------------- --------------------------Hierarchy aggregation Stored leaf dataMember formulas No calculated membersTime intelligence No time-balance processingPOV selection SQL predicatesProcedure call Plain SELECTSecurity enforced Security enforcedIf a value must match the number Casabase Cube calculates, retrieve it through the calculation engine rather than independently re-aggregating the secure fact view.
Pattern 2: Materialized Reporting Tables
Section titled “Pattern 2: Materialized Reporting Tables”Materialized reporting tables provide cube-calculated results through ordinary Snowflake tables.
A Saved Query is scheduled, calculated by Casabase Cube, and written to:
SHARED_DATAConceptually:
Saved Query │ ▼Casabase Cube Engine │ ▼Formulas + Aggregation + Time Intelligence │ ▼SHARED_DATA Table │ ▼BI / Reporting ToolExample Scheduled Result
Section titled “Example Scheduled Result”For example:
CALL CUBE.SCHEDULE_SAVED_QUERY( 'FINANCE', 'Monthly P&L', 'RPT_MONTHLY_PL', 'USING CRON 0 6 * * * America/New_York', 'SMALL', TRUE);Consumers then use:
SELECT *FROM CASABASE_CUBE.SHARED_DATA.RPT_MONTHLY_PL;Each run fully replaces the output table. The result is a snapshot rather than an accumulating history.
Why Materialize
Section titled “Why Materialize”This pattern works well when:
- The consuming tool cannot call stored procedures
- The same result is read repeatedly
- Dashboard latency should be independent of live cube calculation
- Calculated members are required
- Time-balance behavior is required
- A conventional Snowflake table is preferred
Instead of recalculating the cube every time a dashboard opens:
Dashboard Open │ ▼Run Full Cube Querythe pattern becomes:
Scheduled Refresh │ ▼Calculate Once │ ▼Reporting Table │ ├── Dashboard Read ├── Dashboard Read ├── Dashboard Read └── Dashboard ReadThis is particularly appropriate when reads occur much more frequently than underlying data changes.
Materialization Security Boundary
Section titled “Materialization Security Boundary”Materialization changes the security boundary.
The Saved Query executes under a particular Snowflake identity:
Execution Identity │ ▼Casabase Cube Security │ ▼Calculated Result │ ▼Snowflake TableSecurity is resolved when the table is written.
After that, consumers are reading an ordinary Snowflake table. Snowflake table grants determine who can read it.
Casabase Cube row-level security does not dynamically reevaluate for every table consumer.
Therefore, do not use one materialized result for audiences that require different cube security scopes.
Either:
Query the Cube Per Useror:
Create Separate Materializations Per AudiencePattern 3: Live Procedure Call
Section titled “Pattern 3: Live Procedure Call”When a tool can execute multiple SQL statements in the same Snowflake session, it can call the calculation engine directly and then consume the result relationally.
The pattern is:
CALL CUBE.QUERY_CUBE( 'ASOSAMP', '{ "MEASURES": [{"children": "Ratios"}], "TIME": ["Qtr1"], "YEARS": ["Curr Year"] }', NULL, NULL);
SELECT *FROM TABLE(RESULT_SCAN(LAST_QUERY_ID()));This provides full Casabase Cube calculation semantics without creating a persistent reporting table.
What Pattern 3 Provides
Section titled “What Pattern 3 Provides”A live procedure call includes:
- POV resolution
- Hierarchy-aware aggregation
- Member formulas
- Time intelligence
- Solve order
- Current-user security
Conceptually:
Tool │ ▼CALL QUERY_CUBE │ ▼Casabase Cube Engine │ ▼RESULT_SCAN │ ▼Relational ResultThe consuming tool receives a relational result while calculation remains governed by the cube model.
Session Requirement
Section titled “Session Requirement”RESULT_SCAN(LAST_QUERY_ID()) depends on Snowflake session state.
The CALL and subsequent RESULT_SCAN therefore need to run within the same session.
This makes the pattern suitable for tools and applications that can control their SQL session.
Most BI semantic models expect a single SELECT against a named object and therefore cannot use this pattern directly. For those tools, secure views or materialized tables are generally a better fit.
On-Demand Materialization
Section titled “On-Demand Materialization”A variation of pattern 3 is to have the engine write an on-demand extract:
CALL CUBE.QUERY_CUBE( 'FINANCE', '<pov>', 'EXTRACT_TARGET', NULL);
SELECT *FROM CASABASE_CUBE.SHARED_DATA.EXTRACT_TARGET;This provides cube-calculated results without depending on RESULT_SCAN session state.
Use this pattern when an extract is needed on demand rather than through a recurring Saved Query schedule.
Pattern 4: AI and Conversational Access
Section titled “Pattern 4: AI and Conversational Access”Casabase Cube can make its governed multidimensional model available through Snowflake Intelligence and Cortex Agents.
The conversational layer interprets a user’s request and orchestrates configured tools, while Casabase Cube remains responsible for the multidimensional result.
Conceptually:
Natural-Language Question │ ▼Snowflake Intelligence │ ▼Cortex Agent │ ▼Casabase Cube Tools │ ▼Casabase Cube Query Engine │ ▼Governed ResultThis preserves the same architectural separation used elsewhere in Casabase Cube:
- Snowflake provides the agent platform and conversational experience.
- Casabase Cube exposes cube-aware discovery and query capabilities.
- The Casabase Cube query engine applies hierarchy, aggregation, formula, time, and security semantics.
- Agent access does not create an alternate path around Casabase Cube security.
Agent Security Boundary
Section titled “Agent Security Boundary”The current Casabase Cube Intelligence integration uses an app-created Cortex Agent within the Snowflake Native App model.
Access to the agent, its tools, and any consumer-owned Snowflake objects remains governed by Snowflake privileges, Native App controls, caller grants where required, and Casabase Cube application roles.
An app-created agent does not automatically gain unrestricted access to customer-owned Snowflake objects.
Intelligence Setup
Section titled “Intelligence Setup”Agent configuration and Snowflake requirements can evolve independently of the core Casabase Cube query architecture.
For current setup, access, and governance requirements, use the Intelligence documentation rather than older standalone-agent DDL patterns:
MCP and Other AI Integration Patterns
Section titled “MCP and Other AI Integration Patterns”Snowflake AI capabilities can also include MCP-based integration patterns. Only capabilities explicitly configured and authorized for the environment should be treated as available.
The same general rule applies: AI tooling should consume supported Casabase Cube interfaces rather than depend on undocumented internal application objects.
Built-In Streamlit Interface
Section titled “Built-In Streamlit Interface”Casabase Cube also includes its own Streamlit interface.
The built-in application can be used for:
- Modeling
- Querying
- Administration
- Model validation
It requires no separate integration layer and is particularly useful when validating a cube before exposing it to external consuming tools.
Power BI
Section titled “Power BI”Power BI connects through the standard Snowflake connector.
Two primary approaches are available:
Exploratory / Interactive Model │ ▼Secure Viewsand:
Fixed Dashboard │ ▼Scheduled Reporting TablePower BI Semantic Model
Section titled “Power BI Semantic Model”A typical model uses:
<CUBE>_FACT_SECUREas the fact table and separate relational dimension views derived from:
<CUBE>_DIMENSIONSConceptually:
Dimension Views │ ▼Power BI Relationships │ ▼FACT_SECUREPower BI then provides its own semantic-model aggregation and measures.
Power BI Import
Section titled “Power BI Import”For Import mode, a scheduled materialized table is a strong fit.
The dashboard reads a precomputed cube result:
Casabase Cube Refresh │ ▼Reporting Table │ ▼Power BI ImportThis decouples dashboard refresh performance from live cube calculation.
Power BI DirectQuery
Section titled “Power BI DirectQuery”DirectQuery can point to the secure views.
Per-user cube security is preserved only when the report connects using the viewer’s Snowflake identity.
If every viewer connects through a shared Snowflake service identity:
All Power BI Users │ ▼Shared Service Account │ ▼One Casabase Cube Security Scopethen all viewers receive the security scope of that shared identity rather than their individual Casabase Cube scopes.
Power BI and Calculated Members
Section titled “Power BI and Calculated Members”Power BI cannot call a procedure as a modeled table.
Therefore, Casabase Cube calculated members must either:
Come from a Materialized Cube Resultor:
Be Reimplemented in DAX Over Leaf Dataif the secure-view model is used.
If exact Casabase Cube calculation semantics are required, materialization is the safer option.
Tableau
Section titled “Tableau”Tableau also connects through the standard Snowflake connector.
The recommended approaches are:
Live Secure Viewsor:
Extract from Materialized Reporting TableTableau Modeling
Section titled “Tableau Modeling”The secure fact view can serve as the primary data source, while dimension metadata can be joined for hierarchy information.
Hierarchy properties such as:
GENERATIONLEVELcan be used to build Tableau hierarchy behavior.
Tableau Security
Section titled “Tableau Security”With a live connection and per-user Snowflake credentials:
Tableau User │ ▼Snowflake Identity │ ▼Casabase Cube Securitythe user’s cube security scope is enforced.
A Tableau extract is different.
The extract reflects the security scope of the identity that created it. After extraction, the user is consuming the extract rather than dynamically querying Casabase Cube.
Architecturally, this behaves like materialization.
For Excel-style grid consumption, a practical pattern is:
QUERY_CUBE_PIVOT_JSONThe interface returns a pivoted result with column headers, matching the way spreadsheet users often work with multidimensional data.
Conceptually:
POV │ ▼QUERY_CUBE_PIVOT_JSON │ ▼Rows + Pivoted Columns │ ▼Excel GridAn alternative is Snowflake ODBC against a scheduled reporting table for a refreshable relational dataset.
Alteryx
Section titled “Alteryx”Alteryx can connect through:
Snowflake ODBCSnowflake bulk connectorFor leaf-level relational data:
Input Data │ ▼Secure ViewsFor full calculation-engine behavior:
Pre-SQL:CALL CUBE.QUERY_CUBE(...)
Then:SELECT *FROM TABLE(RESULT_SCAN(LAST_QUERY_ID()));For scheduled workflows, writing the result to a table can be more robust than relying on session state.
Alteryx Write-Back Pattern
Section titled “Alteryx Write-Back Pattern”Alteryx writes output to customer-controlled Snowflake tables rather than directly modifying Casabase Cube source data.
Those tables can then become sources for:
- Dimensions
- Facts
- Driver data
- Allocation inputs
Conceptually:
Alteryx │ ▼Customer Snowflake Table │ ▼Casabase Cube Source │ ▼Rebuild / QueryThis is a common pattern for driver tables and allocation inputs.
Python and Custom Applications
Section titled “Python and Custom Applications”Python applications can connect using standard Snowflake interfaces such as:
Snowflake Python ConnectorSnowparkFor full cube semantics, use:
CALL + RESULT_SCANFor large relational reads, use:
Secure ViewsThis allows an application to choose dynamically between:
Need calculated cube result │ ▼QUERY_CUBEand:
Need stored leaf data │ ▼FACT_SECUREdbt models are fundamentally SELECT-based.
They can therefore model directly on:
<CUBE>_FACT_SECURE<CUBE>_DIMENSIONSlike ordinary Snowflake sources.
When a dbt model needs a cube-calculated result, use a materialized reporting table produced by Casabase Cube because calculated results require the engine rather than a simple SELECT over the fact view.
Conceptually:
dbt Needs Leaf Data │ ▼Secure Viewsversus:
dbt Needs Cube Calculation │ ▼Scheduled Casabase Result TableExternal Orchestration
Section titled “External Orchestration”External applications can also orchestrate Casabase Cube operations using supported procedures.
Operations that can participate in external orchestration include:
REBUILD_DIMENSIONSRUN_SCHEDULED_QUERYas procedures that can be triggered from customer-controlled schedulers when preferred over Casabase Cube’s built-in scheduling.
This allows Casabase Cube to participate in broader Snowflake or enterprise orchestration workflows.
Per-User Security in External Tools
Section titled “Per-User Security in External Tools”A critical integration rule is:
Per-user Casabase Cube security requires per-user Snowflake identity at the point the cube is queried.
For example:
User A │ ▼Snowflake Identity A │ ▼Casabase Security AUser B │ ▼Snowflake Identity B │ ▼Casabase Security BIf both users instead connect through:
SERVICE_ACCOUNTCasabase Cube sees:
CURRENT_USER() = SERVICE_ACCOUNTand therefore applies the service account’s security scope to both.
This applies to live secure-view and live procedure-call integrations.
Integration Security by Pattern
Section titled “Integration Security by Pattern”| Pattern | Security Evaluation |
|---|---|
| Secure views | Current connecting Snowflake user |
| Materialized reporting table | Identity that writes the table; later reads use Snowflake table grants |
| Live procedure call | Current connecting Snowflake user |
| AI / conversational | Connecting/requesting identity through the supported Snowflake integration |
Materialization differs from the other patterns because its security scope is fixed at write time.
Integration and Refusal Behavior
Section titled “Integration and Refusal Behavior”Applications that call the calculation engine should also account for Casabase Cube’s refusal model.
If a requested calculation cannot be produced correctly, the engine can return an explicit error rather than an approximation.
Integrations using:
QUERY_CUBEQUERY_CUBE_PIVOT_JSONCALL + RESULT_SCANshould therefore surface meaningful query errors to the consumer rather than silently converting them into blanks or generic failures.
This is especially relevant for custom applications and automated integrations.
Stable Integration Boundary
Section titled “Stable Integration Boundary”Applications should integrate only through supported interfaces.
The architecture contract is:
Documented Procedure? │ ├── Yes ──► Supported │ └── No │ ▼Secure Cube View? │ ├── Yes ──► Supported │ └── No │ ▼Casabase-Created Reporting Table? │ ├── Yes ──► Supported Consumption Object │ └── No ──► Treat as InternalInternal application objects can be changed or migrated between Native App versions. The consumption surface is the supported integration boundary.
No Proprietary Integration Layer
Section titled “No Proprietary Integration Layer”Casabase Cube does not require:
Casabase DriverXMLAMDX EndpointExternal GatewayVendor MiddlewareSeparate Application ServerInstead:
Existing Snowflake Connectivity │ ▼Casabase Cubeis the integration model.
This lets organizations use their existing Snowflake connectivity, identity, networking, BI tooling, and data-platform practices.
Integration Pattern Summary
Section titled “Integration Pattern Summary”Use secure views when:
The consuming tool wants tables+You want native BI modeling+Leaf data is sufficientUse materialized reporting tables when:
You need cube-calculated values+The tool cannot call proceduresor:
The same result is consumed repeatedlyUse live procedure calls when:
You need full cube semantics+The tool can execute multi-statement Snowflake SQLUse AI interfaces when:
You want natural-language access+Snowflake Cortex or MCP is the consuming modelKey Principles
Section titled “Key Principles”- Snowflake is the integration boundary.
- No Casabase-specific driver or gateway is required.
- Integrations should use documented procedures, secure views, reporting tables, or supported AI interfaces.
- Secure views expose leaf facts and hierarchy metadata, not full cube calculation semantics.
- Materialized tables preserve cube-calculated output but resolve security at write time.
CALL + RESULT_SCANprovides live full-engine semantics to tools that support multi-statement SQL.- Power BI and Tableau can model directly over secure Snowflake views.
- Per-user security requires the consumer to preserve the viewer’s Snowflake identity.
- Shared service identities result in a shared cube security scope.
- Excel is well matched to
QUERY_CUBE_PIVOT_JSON. - Alteryx can use secure views, live procedure calls, or materialized output.
- Python and custom applications can choose between relational and engine interfaces.
- dbt should consume secure views or pre-materialized cube-calculated results.
- Cortex Agent and MCP provide AI-oriented consumption patterns.
- Customer-created objects outside the Native App remain customer-managed across upgrades.
- Internal Casabase Cube objects are not a supported integration target.
