{"record":{"id":"eec388e9129fd680","repo":"pentaho/pentaho-kettle","slug":"a-connection-of-type-palo-is-expected-palodimoutputdata","errorCode":null,"errorMessage":"A connection of type PALO is expected","messagePattern":"A connection of type PALO is expected","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/palo/core/src/main/java/org/pentaho/di/trans/steps/palo/dimoutput/PaloDimOutputData.java","lineNumber":42,"sourceCode":"import java.util.ArrayList;\n\nimport org.pentaho.di.core.database.DatabaseMeta;\nimport org.pentaho.di.core.database.PALODatabaseMeta;\nimport org.pentaho.di.core.exception.KettleException;\nimport org.pentaho.di.core.logging.DefaultLogLevel;\nimport org.pentaho.di.palo.core.PaloHelper;\nimport org.pentaho.di.trans.step.BaseStepData;\nimport org.pentaho.di.trans.step.StepDataInterface;\n\npublic class PaloDimOutputData extends BaseStepData implements StepDataInterface {\n  public PaloHelper helper;\n  public int[] indexes;\n  public ArrayList<String> elementNamesBatch = new ArrayList<String>();\n\n  public PaloDimOutputData( DatabaseMeta databaseMeta ) throws KettleException {\n    super();\n    if ( !( databaseMeta.getDatabaseInterface() instanceof PALODatabaseMeta ) ) {\n      throw new KettleException( \"A connection of type PALO is expected\" );\n    }\n\n    // org.pentaho.di.core.logging.\n    this.helper = new PaloHelper( databaseMeta, DefaultLogLevel.getLogLevel() );\n  }\n}\n","sourceCodeStart":24,"sourceCodeEnd":49,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/palo/core/src/main/java/org/pentaho/di/trans/steps/palo/dimoutput/PaloDimOutputData.java#L24-L49","documentation":"PaloDimOutputData's constructor validates the passed DatabaseMeta: it only accepts a PALO-type connection (databaseMeta.getDatabaseInterface() instanceof PALODatabaseMeta). Any other database type throws this KettleException immediately at step data initialization.","triggerScenarios":"Constructing PaloDimOutputData (i.e., running the step) with a DatabaseMeta whose connection type is MySQL, Postgres, generic JDBC, etc., instead of a Palo connection.","commonSituations":"User selected a regular database connection in the step dialog instead of a defined Palo connection; transformation copied between environments where the Palo connection was replaced by a substitute; programmatically instantiating the step with the wrong DatabaseMeta.","solutions":["Select a connection of type PALO in the step's connection dialog (or create one)","Check that the referenced connection still exists and is PALO-typed in the target environment","In code, verify databaseMeta.getDatabaseInterface() instanceof PALODatabaseMeta before constructing"],"exampleFix":"// before\nnew PaloDimOutputData(dbMeta); // dbMeta is MySQL\n// after\nif (dbMeta.getDatabaseInterface() instanceof PALODatabaseMeta) {\n  data = new PaloDimOutputData(dbMeta);\n}","handlingStrategy":"validation","validationCode":"if (!(databaseMeta.getDatabaseInterface() instanceof PALODatabaseMeta)) {\n  throw new KettleException(\"Select a PALO-type connection\");\n}","typeGuard":"boolean isPaloConnection(DatabaseMeta meta) { return meta.getDatabaseInterface() instanceof PALODatabaseMeta; }","tryCatchPattern":"try { data = new PaloDimOutputData(databaseMeta); } catch (KettleException e) {\n  logError(\"Wrong connection type: \" + e.getMessage(), e); setErrors(1);\n}","preventionTips":["Always define/select a PALO connection in the step dialog","Verify connections survive environment migrations (dev->prod)","Do not substitute a generic JDBC connection for Palo"],"tags":["palo","connection-type","validation"],"backgroundTag":"incompatible-source-type","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"}