Skip to content

Dropping a Cube

Dropping a cube permanently removes the cube and its associated Casabase Cube objects.

This is an administrative lifecycle operation intended for cubes that are no longer required.

Because the operation is destructive, Casabase Cube requires explicit confirmation before the cube is deleted.

Conceptually:

Existing Cube
DROP_CUBE
Confirmation Required
┌───┴───┐
│ │
FALSE TRUE
│ │
▼ ▼
Preview Permanently
Only Drop Cube

Dropping a cube removes the cube and its associated Casabase Cube configuration.

This includes configuration such as:

  • Dimension and hierarchy configuration
  • Formulas
  • Cube variables
  • Saved queries
  • Row-level security rules
  • Cube-level settings
  • Other objects associated with the cube

Conceptually:

Cube
├── Dimensions
├── Hierarchies
├── Formulas
├── Cube Variables
├── Saved Queries
├── Security Rules
└── Cube Settings
DROP_CUBE
Removed

The operation acts on the selected Casabase Cube. It does not represent a general-purpose deletion of customer-owned Snowflake source objects.

For example, a customer-owned dimension definition table such as:

FINANCE_DB.PLANNING.DIM_ACCOUNT

is a Snowflake source object referenced by the cube configuration.

Casabase Cube access to customer-owned objects is governed separately through Snowflake privileges.

Before permanently removing a cube, consider whether its configuration may be needed later.

A recommended pre-drop sequence is:

Identify Cube
Review Dependencies
Export Configuration
Preview DROP_CUBE
Confirm Correct Cube
Drop Cube

Use:

EXPORT_CUBE_CONFIG

to preserve the cube configuration as JSON before deletion.

See Exporting & Importing Configuration.

Remember that a configuration export does not contain the cube’s business data or the contents of referenced dimension definition tables. If those are required for recovery, they must be preserved separately.

From Cube Config:

  1. Select the cube you want to remove.
  2. Select Drop Cube.
  3. Type the cube name to confirm the operation.
  4. Select Drop Cube.

Requiring the cube name to be entered provides an additional safeguard against accidental deletion.

Before confirming the operation, verify that you have selected the intended cube.

Use:

CUBE.DROP_CUBE

to drop a cube programmatically.

DROP_CUBE uses a two-step confirmation pattern.

First call the procedure with:

P_CONFIRM = FALSE

For example:

CALL CASABASE_CUBE.CUBE.DROP_CUBE(
'MY_CUBE',
FALSE
);

This performs a dry run.

No objects are deleted.

Instead, Casabase Cube returns a summary of what would be removed.

After reviewing the preview, call the procedure with:

P_CONFIRM = TRUE

For example:

CALL CASABASE_CUBE.CUBE.DROP_CUBE(
'MY_CUBE',
TRUE
);

This permanently removes the cube and its associated objects.

Parameter Type Default Description
P_CUBE_NAME VARCHAR Name of the cube to drop.
P_CONFIRM BOOLEAN FALSE When FALSE, previews what will be deleted without making changes. When TRUE, permanently deletes the cube and its associated objects.

The default:

P_CONFIRM = FALSE

makes the procedure non-destructive unless deletion is explicitly confirmed.

The dry-run capability is an important safety feature.

When:

P_CONFIRM = FALSE

Casabase Cube returns information about the cube and the objects that would be removed without modifying the cube.

The preview includes counts such as:

  • Hierarchies
  • Formulas
  • Cube variables
  • Saved queries
  • Security rules

Conceptually:

DROP_CUBE
P_CONFIRM = FALSE
Inspect Cube
Return Deletion Summary
No Changes Made

Use the preview to confirm that:

  • The correct cube was selected.
  • The expected configuration is associated with the cube.
  • Any configuration that must be retained has been exported.
  • The cube is ready for permanent deletion.

When:

P_CONFIRM = TRUE

the operation becomes destructive.

Conceptually:

DROP_CUBE
P_CONFIRM = TRUE
Confirm Cube
Remove Cube and
Associated Objects
Cube No Longer Available

This action cannot be undone through DROP_CUBE.

If the cube configuration was exported beforehand, it may be possible to recreate the configuration later using:

IMPORT_CUBE_CONFIG

but configuration import should not be treated as restoration of the cube’s business data.

Suppose the cube:

FINANCE_TEST

is no longer required.

First export its configuration if you may need to recreate it later:

CALL CASABASE_CUBE.CUBE.EXPORT_CUBE_CONFIG(
'FINANCE_TEST'
);

Then preview the drop:

CALL CASABASE_CUBE.CUBE.DROP_CUBE(
'FINANCE_TEST',
FALSE
);

Review the returned summary.

If the correct cube has been identified and you are ready to delete it:

CALL CASABASE_CUBE.CUBE.DROP_CUBE(
'FINANCE_TEST',
TRUE
);

The sequence is:

FINANCE_TEST
Export Configuration
DROP_CUBE(FALSE)
Review Preview
DROP_CUBE(TRUE)
Cube Removed

Dropping a cube should not be confused with removing only the data from an existing cube.

These are different lifecycle operations.

DROP_CUBE
└── Removes the cube and
associated objects
CLEAR_CUBE_DATA
└── Removes data from the
cube's fact table while
preserving the cube structure

Use:

DROP_CUBE

when the cube itself is no longer required.

Use:

CLEAR_CUBE_DATA

when the multidimensional model should remain but its fact data needs to be removed.

This distinction is particularly important when preparing a cube for a new data load or when retaining its configuration for continued use.

Dropping a Cube vs. Creating an Empty Clone

Section titled “Dropping a Cube vs. Creating an Empty Clone”

If you need a configuration-only copy of an existing cube, do not drop and recreate the model manually.

Instead, CLONE_CUBE can create an empty replica using:

P_REBUILD = FALSE

This copies the cube configuration without copying the source fact table.

Conceptually:

Existing Cube
├───────────────┐
│ │
▼ ▼
DROP_CUBE CLONE_CUBE
P_REBUILD = FALSE
│ │
▼ ▼
Cube Removed Empty Replica
Configuration Preserved

See Cloning a Cube.

If you exported the configuration before dropping the cube, the JSON can be used to recreate configuration through:

IMPORT_CUBE_CONFIG

Conceptually:

Before Drop
Cube
EXPORT_CUBE_CONFIG
Configuration JSON
Later
Configuration JSON
IMPORT_CUBE_CONFIG
Recreated Configuration

However:

Configuration Recovery
Complete Data Recovery

The exported JSON does not include business data or the contents of referenced dimension definition tables.

See Exporting & Importing Configuration.

DROP_CUBE requires the:

CUBE_ADMIN

application role.

Because dropping a cube permanently removes application objects, access to CUBE_ADMIN should be limited to users who require administrative capabilities.

The Snowflake account role used by an administrator must have access to the Casabase Cube application role through the appropriate Snowflake grants.

See Roles and Privileges.

Dropping a cube is a significant administrative lifecycle event.

Where applicable, review Casabase Cube audit information as part of operational or governance procedures involving cube deletion.

Organizations may also choose to retain:

  • The exported cube configuration
  • Change-management approval
  • The reason for deletion
  • The administrator responsible for the operation
  • Relevant operational records

according to their own governance and retention requirements.

See Audit Log.

For production or otherwise important cubes, use the following workflow:

Confirm Cube Is
No Longer Required
Review Recovery
Requirements
Export Configuration
Preserve Required
Data Separately
DROP_CUBE
P_CONFIRM = FALSE
Review Preview
Confirm Cube Name
DROP_CUBE
P_CONFIRM = TRUE
Verify Removal

The dry run should be treated as a normal part of the SQL deletion workflow rather than an optional troubleshooting step.

When dropping cubes:

  • Use P_CONFIRM = FALSE first to preview the operation.
  • Review the returned object counts before confirming deletion.
  • Verify the cube name carefully.
  • Export configuration before dropping an important cube.
  • Remember that configuration export does not preserve business data.
  • Preserve any required source data or other recovery artifacts separately.
  • Use P_CONFIRM = TRUE only after confirming that permanent deletion is intended.
  • Restrict CUBE_ADMIN access appropriately.
  • Use CLEAR_CUBE_DATA instead when only fact data should be removed.
  • Retain appropriate audit or change-management records for important production deletions.
  • Do not rely on configuration export as a complete data-recovery mechanism.
  • DROP_CUBE permanently removes a Casabase Cube and its associated objects.
  • The operation requires the CUBE_ADMIN application role.
  • P_CONFIRM defaults to FALSE.
  • P_CONFIRM = FALSE performs a dry run and does not modify the cube.
  • The dry run returns a summary of objects that would be removed.
  • P_CONFIRM = TRUE performs the permanent deletion.
  • The UI requires the cube name to be entered as confirmation.
  • Important configuration should be exported before dropping a cube when recovery may be required.
  • Configuration export does not contain business data.
  • CLEAR_CUBE_DATA should be used instead when the cube structure should remain and only fact data needs to be removed.
  • Dropping a cube is an administrative cube lifecycle operation.