pentaho/pentaho-kettle · error · KettleStepException

It was not possible to find operation field

Error message

It was not possible to find operation field [<operationOrderField>] in the input stream!

What it means

Thrown during processRow() initialization when the configured OperationOrderField is not present in the input row metadata (indexOfValue returns -1). The step uses this field's per-row values to classify rows as insert/update/delete, so it cannot run without it.

Solutions

  1. Re-select the operation field in the step dialog using the actual input field names (preview the upstream output).
  2. Add/restore the operation column upstream (e.g. via 'Select values' or 'Add constants') with the expected name and values.
  3. Fix typos/case so the dialog value exactly matches the stream field name.
  4. Verify you connected the intended input hop that carries the operation field.

Example fix

// before (upstream)
SELECT id FROM src; // no op column
// after
SELECT id, 'insert' AS operation FROM src;
Defensive patterns

Strategy: validation

Validate before calling

List<String> fields = inputRowMeta.getFieldNames();
if (!fields.contains(operationOrderField)) {
  throw new ValidationException("Operation field missing from stream: " + operationOrderField);
}

Try / catch

catch (KettleStepException e) {
  if (e.getMessage().contains("not possible to find operation field")) {
    logError("Fix the Operation order field setting or add the column upstream.");
  }
  throw e;
}

Prevention

When it happens

Trigger: data.inputRowMeta.indexOfValue(meta.getOperationOrderField()) < 0 during the first call of processRow — the dialog field name doesn't match any incoming stream field (typo, case mismatch, field removed/renamed upstream).

Common situations: Upstream step renamed or removed the operation column; wrong field name typed in 'Operation order field'; hop rewired to a different source that lacks the field; locale/whitespace issues in the field name.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/synchronizeaftermerge/SynchronizeAfterMerge.java:690

        }
      } else {
        data.realTableName = environmentSubstitute( meta.getTableName() );
        if ( Utils.isEmpty( data.realTableName ) ) {
          throw new KettleStepException( "The table name is not specified (or the input field is empty)" );
        }
        data.realSchemaTable =
          data.db.getDatabaseMeta().getQuotedSchemaTableCombination( data.realSchemaName, data.realTableName );
      }

      // Cache the position of the operation order field
      if ( data.indexOfOperationOrderField < 0 ) {
        data.indexOfOperationOrderField = data.inputRowMeta.indexOfValue( meta.getOperationOrderField() );
        if ( data.indexOfOperationOrderField < 0 ) {
          String message =
            "It was not possible to find operation field [" + meta.getOperationOrderField()
              + "] in the input stream!";
          logError( message );
          throw new KettleStepException( message );
        }
      }

      data.insertValue = environmentSubstitute( meta.getOrderInsert() );
      data.updateValue = environmentSubstitute( meta.getOrderUpdate() );
      data.deleteValue = environmentSubstitute( meta.getOrderDelete() );

      data.insertRowMeta = new RowMeta();

      // lookup the values!
      if ( log.isDebug() ) {
        logDebug( BaseMessages.getString( PKG, "SynchronizeAfterMerge.Log.CheckingRow" ) + Arrays.toString( nextRow ) );
      }

      data.keynrs = new int[meta.getKeyStream().length];
      data.keynrs2 = new int[meta.getKeyStream().length];
      for (int i = 0; i < meta.getKeyStream().length; i++) {
        data.keynrs[i] = data.inputRowMeta.indexOfValue( meta.getKeyStream()[i] );

View on GitHub (pinned to f3058517a1)