pentaho/pentaho-kettle · error · KettleException

Failed to clear Cube

Error message

Failed to clear Cube

What it means

Thrown by PaloCellOutput.processRow when meta.getClearCube() is true and data.helper.clearCube(meta.getCube()) throws. The original exception is discarded (not chained), so only the fact that clearing the target cube failed is reported.

Solutions

  1. Verify the cube name configured in the step exists on the Palo server.
  2. Check Palo credentials/permissions allow clearing (deleting data of) the cube.
  3. Confirm the Palo server connection is alive before the run; reconnect if needed.
  4. Modify the throw to chain the cause (ex) so the real reason is visible in logs.
  5. Disable 'clear cube' and clear manually if the operation is not required.

Example fix

// before
throw new KettleException( "Failed to clear Cube" );
// after
throw new KettleException( "Failed to clear Cube " + meta.getCube(), ex );
Defensive patterns

Strategy: validation

Validate before calling

PaloHelper h = new PaloHelper(meta.getDatabaseMeta(), logLevel); h.connect(); /* assert cube meta.getCube() exists and user has clear rights before run */

Try / catch

try { trans.execute() } catch (KettleException e) { if (e.getMessage().startsWith("Failed to clear Cube")) { /* check cube name/permissions; note cause is lost — re-run with debugging */ } }

Prevention

When it happens

Trigger: First row processed with 'clear cube' option enabled while clearCube fails — cube name doesn't exist on the Palo server, connection dropped, or insufficient rights to delete cube data.

Common situations: Typo in cube name; Palo user lacks write/admin rights on the cube; Palo server unreachable or restarted; cube locked by another writer.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/457299a092da5e3d. Report an issue: GitHub.

Appendix: source

Thrown at plugins/palo/core/src/main/java/org/pentaho/di/trans/steps/palo/celloutput/PaloCellOutput.java:71

      this.logDebug( "No More Rows." );
      setOutputDone();
      return false;
    }
    if ( first ) {
      first = false;
      this.logBasic( "First Row Analysis." );
      data.indexes = new int[meta.getFields().size() + 1];
      for ( int i = 0; i < data.indexes.length - 1; i++ ) {
        data.indexes[i] = getInputRowMeta().indexOfValue( meta.getFields().get( i ).getFieldName() );
      }
      data.indexes[data.indexes.length - 1] = getInputRowMeta().indexOfValue( meta.getMeasure().getFieldName() );
      this.logBasic( "First Row Ok." );

      if ( meta.getClearCube() ) {
        try {
          data.helper.clearCube( meta.getCube() );
        } catch ( Exception ex ) {
          throw new KettleException( "Failed to clear Cube" );
        }
      }
    }

    String row = "";
    try {
      Object[] newRow = new Object[meta.getFields().size() + 1];
      for ( int i = 0; i < data.indexes.length; i++ ) {
        if ( i == data.indexes.length - 1 ) {
          if ( meta.getMeasureType().equals( "Numeric" ) ) {
            newRow[i] = getInputRowMeta().getNumber( r, data.indexes[i] );
          } else {
            newRow[i] = getInputRowMeta().getString( r, data.indexes[i] );
          }
        } else {
          newRow[i] = getInputRowMeta().getString( r, data.indexes[i] );
        }
      }

View on GitHub (pinned to f3058517a1)