Troubleshooting

Estimated reading: 9 minutes

9.1 Overview

This section covers common issues you may encounter when using Casabase Cube, along with diagnostic steps and solutions. For each issue, start with the suggested steps in order. Most problems are resolved within the first two or three checks.

9.2 Query Returns No Data

Symptoms: QUERY_CUBE returns an empty result set with no error.

Diagnostic Steps:

StepAction
1Check dimension names. POV keys must match hierarchy names exactly. Hierarchy names are case-sensitive and usually UPPERCASE. Use LIST_CUBE_HIERARCHIES to see the correct names.
2Check member names. Member names are case-sensitive and must match exactly. Verify spelling, case, and whitespace.
3Use {"member": ...} syntax for upper-level members. When selecting a parent or aggregated member in the POV, you must use the object syntax (e.g., {"member": "Q1"}) instead of a bare string (e.g., "Q1"). Bare strings only match leaf-level data in the fact table.
4Check the data table. Confirm your fact table contains data for the members you selected. Query the fact table directly to verify.
5Check column mapping. The values in your fact table’s dimension column must match the bottom-level member names in the hierarchy. If they do not align, the query will find no matching rows.
6Check row-level security. If security is enabled for a hierarchy, your user must have a security rule granting access. Without a rule, you may see no data.
7Run a Health Check. Use the Health Check feature on the Cube Config page (or via SQL) to validate the overall cube configuration.

Quick Verification:

-- List hierarchies and check names
CALL CASABASE_CUBE.CUBE.LIST_CUBE_HIERARCHIES('MY_CUBE');

-- Check if fact table has data
SELECT COUNT(*) FROM MY_DB.MY_SCHEMA.MY_FACT_TABLE;

Common POV Mistake — Upper-Level Members:

-- WRONG: Bare string for a parent member — returns no data
CALL CASABASE_CUBE.CUBE.QUERY_CUBE(
    'MY_CUBE',
    'DB.SCHEMA.FACT_TABLE',
    'AMT',
    '{
        "ACCOUNT": [{"member": "Revenue"}],
        "PERIOD": ["Q1"],
        "ENTITY": ["Corporate"]
    }',
    NULL,
    NULL
);

-- CORRECT: Use {"member": ...} for the upper-level Period member
CALL CASABASE_CUBE.CUBE.QUERY_CUBE(
    'MY_CUBE',
    'DB.SCHEMA.FACT_TABLE',
    'AMT',
    '{
        "ACCOUNT": [{"member": "Revenue"}],
        "PERIOD": [{"member": "Q1"}],
        "ENTITY": ["Corporate"]
    }',
    NULL,
    NULL
);

9.3 Hierarchy Build Errors

Symptoms: CREATE_HIERARCHY or REBUILD_AUTO_HIERARCHIES returns an error.

Common Errors and Solutions

ErrorCauseSolution
Orphan memberA child references a parent that does not exist in the dimension table.Add the missing parent member, or correct the parent reference.
Circular referenceA member is both an ancestor and descendant of itself (e.g., A → B → C → A).Break the cycle by correcting the parent-child relationship.
Duplicate memberThe same member name appears more than once (and is not marked as a shared member).Remove the duplicate or mark one instance as a shared member.
Invalid operatorA member has an operator other than +, -, or ~.Correct the operator column to use one of the three valid values.
Empty/NULL childA row has a NULL or blank child member name.Remove the row or provide a valid member name.
Self-referencing memberA member’s parent is set to itself.Correct the parent to reference a different member, or set to NULL for the root.
Multiple hierarchy topsMore than one member has a NULL or empty parent.Ensure only one root member exists. If you need multiple top-level members, create a single root that is their parent.
Leading/trailing spacesMember names contain invisible whitespace.Trim whitespace from member names in your dimension table.

Preventive Step: Run validation before creating or rebuilding:

CALL CASABASE_CUBE.CUBE.VALIDATE_HIERARCHY(
    'MY_DB.MY_SCHEMA.DIM_ACCOUNT',   -- Source table
    'PARENT',                         -- Parent column
    'CHILD',                          -- Child column
    'OPERATOR'                        -- Operator column
);

This returns a list of all issues found, allowing you to fix them before building the hierarchy.

9.4 Formula Errors

Symptoms: A formula returns NULL, incorrect values, or an error message.

Common Issues and Solutions

IssueCauseSolution
Member not foundThe [DIMENSION].[Member] reference does not match an actual member.Check exact spelling and case. Member names are case-sensitive.
Wrong dimension nameThe dimension name in the reference does not match the hierarchy name.Hierarchy names are usually UPPERCASE. Use LIST_CUBE_HIERARCHIES to verify.
Division by zeroThe denominator evaluates to zero.Wrap divisors in NULLIF(x, 0) or NULLIFZERO(x).
Solve order conflictFormula A references Formula B, but A has an equal or lower solve order.Ensure dependent formulas have a higher solve order than the formulas they reference.
Circular dependencyFormula A references B and B references A.Restructure formulas to break the cycle.
Wrong bracket syntaxUsing [DIM.Member] instead of [DIM].[Member].Each component must be in its own brackets: [DIM].[Member].
Formula returns NULLA cross-dimensional reference targets a member with no data.Verify the referenced member exists and has data. Wrap in COALESCE() if a default value is needed.

Debugging Approach:

  1. Test with inline formulas first: Pass inline formula objects in the FORMULA_LIST parameter to iterate quickly without saving.
  2. Start with minimal POV: Query just the dimension your formula references with a small member set.
  3. Use Server Validate: Click the validation button in the formula editor to check references.
  4. Run Health Check: Validates all formula syntax and member references.
  5. Check auto-detection: Use the formula dependency detection feature to auto-compute solve order and find circular dependencies.

9.5 Slow Query Performance

Symptoms: Queries take longer than expected to return results.

Optimization Steps

StepAction
1Use a larger warehouse. Query performance scales with warehouse size. Try XS → S → M for larger datasets.
2Reduce member selection. Use specific members or children instead of idescendants on large hierarchies.
3Query bottom-level members only. Use the bottom operator to skip intermediate aggregation levels when you only need detail data.
4Materialize results. For frequently run queries, write results to an output table using the OUTPUT_TABLE parameter and query the table instead.
5Check if hierarchies need rebuilding. Stale hierarchies may cause suboptimal query plans. Rebuild if the source data has changed significantly.
6Reduce formula complexity. Deeply nested formulas with many cross-dimensional references increase query complexity. Simplify where possible.

9.6 Write-Back Issues

Symptoms: WRITE_CUBE returns an error or values do not appear in queries.

Common Issues and Solutions

IssueCauseSolution
“Target intersection is locked”One or more dimension members in the POV are locked.Unlock the member, or use {"force": true} in the OPTIONS parameter.
“No input table”The cube does not have an input table created yet.Run CREATE_INPUT_TABLE for the cube before writing.
“Write rejected: Non-leaf members detected”You are writing to a parent member without specifying a spread method.Use a SPREAD_* method (SPREAD_EVEN, SPREAD_PROPORTIONAL, SPREAD_FILL) or set {"allow_non_leaf": true}.
Written values do not appear in queryThe query may not be including the correct intersection, or the input table data does not match the dimension column names.Verify the POV members match exactly between the write and read operations.
Spread produces unexpected valuesProportional spread with no existing data falls back to even distribution.Seed the input table from source data first to establish proportions.

Dry Run: Always preview large writes before executing:

CALL CASABASE_CUBE.CUBE.WRITE_CUBE(
    'MY_CUBE', '{"ACCOUNT": "Revenue", "PERIOD": "Q1"}', 1000000,
    'SPREAD_EVEN', 'PERIOD',
    '{"dry_run": true}'
);

9.7 Access & Permission Issues

Symptoms: Users cannot see the application, specific pages, or data.

Common Issues and Solutions

IssueCauseSolution
Cannot see the applicationUser does not have an application role.Grant an application role: GRANT APPLICATION ROLE CASABASE_CUBE.CUBE_PUBLIC TO ROLE user_role;
Admin pages not visibleUser has CUBE_PUBLIC or CUBE_WRITER but not CUBE_ADMIN.Grant CUBE_ADMIN if admin access is needed.
Cannot write dataUser has CUBE_PUBLIC (read-only).Grant CUBE_WRITER or CUBE_ADMIN for data entry access.
“Insufficient privileges” on dataThe application does not have SELECT access to the referenced table.Grant access: GRANT SELECT ON TABLE db.schema.table TO APPLICATION CASABASE_CUBE; Also ensure GRANT USAGE ON DATABASE and GRANT USAGE ON SCHEMA.
Row-level security filters too muchSecurity rules do not include the members the user needs.Add security rules granting access to the required members.
AI Help Center not workingThe Cortex user role has not been granted to the application.Run: GRANT DATABASE ROLE SNOWFLAKE.CORTEX_USER TO APPLICATION CASABASE_CUBE;

9.8 Hierarchy Validation Reference

The following checks are performed when creating or rebuilding a hierarchy:

CheckDescriptionSeverity
Multiple hierarchy topsMore than one root member (NULL/empty parent)Error
Duplicate base membersSame child name appears more than once (non-shared)Error
Invalid aggregation operatorOperator is not +, -, or ~Error
Empty or NULL child memberRow has no member nameError
Self-referencing memberParent equals childError
Orphan memberParent does not exist in the tableError
Member name exceeds 2000 charactersMember name is too longError
Leading or trailing spacesWhitespace at start or end of member nameWarning
Circular referenceParent-child loop detectedError
Duplicate aliasSame alias used by multiple membersWarning

Errors prevent the hierarchy from being created. Warnings are reported but do not block creation.

9.9 Using Health Check

Health Check is the primary diagnostic tool for validating your cube configuration. It examines:

  • Hierarchy table existence and validity
  • Source table accessibility (can the application still read them?)
  • Formula syntax and member references
  • Security configuration
  • Data table connectivity

Running a Health Check

Via the UI:

  1. Navigate to Cube Config
  2. Select a cube
  3. Click Health Check

Via SQL:

CALL CASABASE_CUBE.CUBE.HEALTH_CHECK('MY_CUBE');

Results are returned as a table with columns:

  • STATUS: OK, WARNING, or ERROR
  • CHECK_NAME: What was checked
  • MESSAGE: Details about the finding

Address all ERROR results first, then review WARNING results. OK results indicate no issues found.

9.10 Verifying Aggregation Integrity

To confirm that a hierarchy is aggregating correctly, verify that the sum of a parent’s children equals the parent’s value:

-- Query a parent and its children
CALL CASABASE_CUBE.CUBE.QUERY_CUBE(
    'MY_CUBE',
    'DB.SCHEMA.FACT_TABLE',
    'AMT',
    '{
        "ACCOUNT": [{"ichildren": "Total P&L"}],
        "PERIOD": ["Jan"],
        "ENTITY": ["Corporate"]
    }',
    NULL,
    NULL
);

In the results, the parent member’s AMT should equal the sum of its children’s AMT values (accounting for + and - operators). If it does not:

  1. Check that the operator column is correct in the dimension table
  2. Rebuild the hierarchy
  3. Verify no duplicate data exists in the fact table for the same intersection

9.11 Getting Additional Help

If the steps above do not resolve your issue:

ResourceDetails
In-App Help CenterUse natural language to describe your issue. The AI-powered Help Center can diagnose problems and suggest solutions.
Audit LogCheck the audit log for error details. Filter by STATUS = ‘ERROR’ and your time range.
Websitecube.casabasesoftware.com
Email Supportsupport@casabasesoftware.com. Include the cube name, error message, and steps to reproduce.
Share this Doc

Troubleshooting

Or copy link

CONTENTS