{"record":{"id":"457299a092da5e3d","repo":"pentaho/pentaho-kettle","slug":"failed-to-clear-cube","errorCode":null,"errorMessage":"Failed to clear Cube","messagePattern":"Failed to clear Cube","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/palo/core/src/main/java/org/pentaho/di/trans/steps/palo/celloutput/PaloCellOutput.java","lineNumber":71,"sourceCode":"      this.logDebug( \"No More Rows.\" );\n      setOutputDone();\n      return false;\n    }\n    if ( first ) {\n      first = false;\n      this.logBasic( \"First Row Analysis.\" );\n      data.indexes = new int[meta.getFields().size() + 1];\n      for ( int i = 0; i < data.indexes.length - 1; i++ ) {\n        data.indexes[i] = getInputRowMeta().indexOfValue( meta.getFields().get( i ).getFieldName() );\n      }\n      data.indexes[data.indexes.length - 1] = getInputRowMeta().indexOfValue( meta.getMeasure().getFieldName() );\n      this.logBasic( \"First Row Ok.\" );\n\n      if ( meta.getClearCube() ) {\n        try {\n          data.helper.clearCube( meta.getCube() );\n        } catch ( Exception ex ) {\n          throw new KettleException( \"Failed to clear Cube\" );\n        }\n      }\n    }\n\n    String row = \"\";\n    try {\n      Object[] newRow = new Object[meta.getFields().size() + 1];\n      for ( int i = 0; i < data.indexes.length; i++ ) {\n        if ( i == data.indexes.length - 1 ) {\n          if ( meta.getMeasureType().equals( \"Numeric\" ) ) {\n            newRow[i] = getInputRowMeta().getNumber( r, data.indexes[i] );\n          } else {\n            newRow[i] = getInputRowMeta().getString( r, data.indexes[i] );\n          }\n        } else {\n          newRow[i] = getInputRowMeta().getString( r, data.indexes[i] );\n        }\n      }","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/palo/core/src/main/java/org/pentaho/di/trans/steps/palo/celloutput/PaloCellOutput.java#L53-L89","documentation":"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.","triggerScenarios":"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.","commonSituations":"Typo in cube name; Palo user lacks write/admin rights on the cube; Palo server unreachable or restarted; cube locked by another writer.","solutions":["Verify the cube name configured in the step exists on the Palo server.","Check Palo credentials/permissions allow clearing (deleting data of) the cube.","Confirm the Palo server connection is alive before the run; reconnect if needed.","Modify the throw to chain the cause (ex) so the real reason is visible in logs.","Disable 'clear cube' and clear manually if the operation is not required."],"exampleFix":"// before\nthrow new KettleException( \"Failed to clear Cube\" );\n// after\nthrow new KettleException( \"Failed to clear Cube \" + meta.getCube(), ex );","handlingStrategy":"validation","validationCode":"PaloHelper h = new PaloHelper(meta.getDatabaseMeta(), logLevel); h.connect(); /* assert cube meta.getCube() exists and user has clear rights before run */","typeGuard":null,"tryCatchPattern":"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 */ } }","preventionTips":["Validate the cube name exists on the server before enabling clear-cube","Grant Palo user sufficient rights to clear the cube","Chain the cause exception when modifying plugin code","Avoid enabling clear-cube until connection is verified"],"tags":["kettle","palo","olap","cube"],"backgroundTag":"database-write-failed","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}