pentaho/pentaho-kettle · error · KettleException

JobExecutor.IncorrectDataTypePassed

JobExecutor.IncorrectDataTypePassed

Error message

JobExecutor.IncorrectDataTypePassed

What it means

Thrown in executeJob when copying the job's result rows to the output stream: the actual data type of each result-row field (from the result row's value metadata) must exactly match the expected type configured in the step's 'result rows field type' settings. If the runtime type descriptor differs from the configured ValueMeta type, this error names both the received and expected type.

Solutions

  1. Open the JobExecutor step's 'Result rows' tab and set each field's type to match the type actually produced by the nested job
  2. Inspect the nested job's result rows (e.g. with a 'Get rows from result' step) to confirm the real data types
  3. Change the producing transformation/job to emit the expected type (e.g. add a Select values step converting the field)
  4. Keep the field types in the step metadata in sync whenever the result-row producer changes

Example fix

// before (step expects Number, job result row delivers String 'amount')
Result rows field 'amount', type: Number -> IncorrectDataTypePassed (String, Number)
// after
Either set step type to String, or in the producing transformation convert:
Select values: amount, String -> Number
Defensive patterns

Strategy: validation

Validate before calling

// Verify result-row types match the step configuration before execution
JobExecutorMeta meta = (JobExecutorMeta) stepMeta.getStepMetaInterface();
for ( int i = 0; i < meta.getResultRowsField().length; i++ ) {
  String expected = ValueMetaFactory.getValueMetaName( meta.getResultRowsType()[i] );
  // compare against the types actually emitted by the nested job's result rows
  System.out.println("Field " + meta.getResultRowsField()[i] + " must be of type " + expected);
}

Type guard

boolean resultRowTypesMatch(RowMetaInterface resultRowMeta, JobExecutorMeta meta) {
  for ( int i = 0; i < meta.getResultRowsField().length; i++ ) {
    if ( resultRowMeta.getValueMeta(i).getType() != meta.getResultRowsType()[i] ) return false;
  }
  return true;
}

Try / catch

try {
  processJobResult();
} catch ( KettleException e ) {
  if ( e.getMessage().contains("IncorrectDataTypePassed") ) {
    logError("Result row type mismatch: " + e.getMessage()
      + " — fix the Result rows type tab or convert the field upstream");
  } else { throw e; }
}

Prevention

When it happens

Trigger: The nested job's result rows contain a field whose ValueMetaInterface.getType() differs from meta.getResultRowsType()[i] configured in the step — e.g. configured as Number but the job's result row provides Integer or String.

Common situations: Job's result row structure changed (different transformation inside the nested job producing the result rows); step metadata copied from another environment; type edited in the step dialog (e.g. String vs Date) after the producing job changed; loosely-typed CSV-derived fields arriving as String.

Understand the failure class

Background: Type mismatch errors: IllegalArgumentException, TypeError and type guards across 150 open-source libraries — this error's family across 150 libraries.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/jobexecutor/JobExecutor.java:321

      }
      if ( !Utils.isEmpty( meta.getExecutionLogChannelIdField() ) ) {
        outputRow[idx++] = data.executorJob.getLogChannelId();
      }

      putRowTo( data.executionResultsOutputRowMeta, outputRow, data.executionResultRowSet );
    }

    // Optionally also send the result rows to a specified target step...
    //
    if ( meta.getResultRowsTargetStepMeta() != null && result.getRows() != null ) {
      for ( RowMetaAndData row : result.getRows() ) {

        Object[] targetRow = RowDataUtil.allocateRowData( data.resultRowsOutputRowMeta.size() );

        for ( int i = 0; i < meta.getResultRowsField().length; i++ ) {
          ValueMetaInterface valueMeta = row.getRowMeta().getValueMeta( i );
          if ( valueMeta.getType() != meta.getResultRowsType()[i] ) {
            throw new KettleException( BaseMessages.getString(
              PKG, "JobExecutor.IncorrectDataTypePassed", valueMeta.getTypeDesc(),
              ValueMetaFactory.getValueMetaName( meta.getResultRowsType()[i] ) ) );
          }

          targetRow[i] = row.getData()[i];
        }
        putRowTo( data.resultRowsOutputRowMeta, targetRow, data.resultRowsRowSet );
      }
    }

    if ( meta.getResultFilesTargetStepMeta() != null && result.getResultFilesList() != null ) {
      for ( ResultFile resultFile : result.getResultFilesList() ) {
        Object[] targetRow = RowDataUtil.allocateRowData( data.resultFilesOutputRowMeta.size() );
        int idx = 0;
        targetRow[idx++] = resultFile.getFile().getName().toString();

        // TODO: time, origin, ...

View on GitHub (pinned to f3058517a1)