pentaho/pentaho-kettle · error · KettleException

PropertyOutput.Log.ErrorFindingField

Error message

PropertyOutput.Log.ErrorFindingField

What it means

PropertyOutput writes key/value pairs to a .properties file. During the first call of processRow() the step looks up the configured Key field in the incoming row metadata; if indexOfValue() returns -1 the field does not exist in the stream, so the step logs and throws this KettleException and the step fails.

Solutions

  1. Open the Property Output step dialog and set Key Field to a field that actually exists in the incoming stream.
  2. Use 'Get Fields' in the step dialog so it pulls real field names from the hop.
  3. Check upstream steps (Select Values, Calculator, etc.) for renames/deletions of the key field.
  4. Preview the input rows (right-click step > Preview) to confirm which fields reach this step.

Example fix

// before (step XML/dialog)
<key_field>kye_name</key_field>
// after
<key_field>key_name</key_field>  <!-- must exactly match an upstream field name -->
Defensive patterns

Strategy: validation

Validate before calling

// in a custom check before running the transformation
String keyField = propertyOutputMeta.getKeyField();
RowMetaInterface rmi = transMeta.getPrevStepFields(propertyOutputStepMeta);
if (rmi == null || keyField == null || rmi.indexOfValue(keyField) < 0) {
  throw new KettleException("Key field '" + keyField + "' missing from input stream");
}

Type guard

boolean hasField(RowMetaInterface rmi, String name) {
  return rmi != null && name != null && rmi.indexOfValue(name) >= 0;
}

Try / catch

try {
  trans.execute(transName);
} catch (KettleException e) {
  if (String.valueOf(e.getMessage()).contains("PropertyOutput.Log.ErrorFindingField")) {
    logError("Check the Property Output Key Field setting: " + e.getMessage());
  }
}

Prevention

When it happens

Trigger: processRow() runs with meta.getKeyField() set to a name that is not present in the incoming RowMeta — i.e. the keyField configured on the Property Output step matches no upstream field (line 72-77).

Common situations: Renaming or deleting the upstream field without updating the Property Output step; connecting a different step that doesn't emit the key field; typo in the Key Field setting; a Select Values step removed the field before this step.

Understand the failure class

Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/propertyoutput/PropertyOutput.java:76

    if ( r == null ) { // no more input to be expected...
      setOutputDone();
      return false;
    }

    if ( first ) {
      first = false;
      data.inputRowMeta = getInputRowMeta();
      data.outputRowMeta = data.inputRowMeta.clone();
      meta.getFields( getTransMeta().getBowl(), data.outputRowMeta, getStepname(), null, null, this, repository,
        metaStore );

      // Let's take the index of Key field ...
      data.indexOfKeyField = data.inputRowMeta.indexOfValue( meta.getKeyField() );
      if ( data.indexOfKeyField < 0 ) {
        // The field is unreachable !
        logError( BaseMessages.getString( PKG, "PropertyOutput.Log.ErrorFindingField", meta.getKeyField() ) );
        throw new KettleException( BaseMessages.getString( PKG, "PropertyOutput.Log.ErrorFindingField", meta.getKeyField() ) );
      }

      // Let's take the index of Key field ...
      data.indexOfValueField = data.inputRowMeta.indexOfValue( meta.getValueField() );
      if ( data.indexOfValueField < 0 ) {
        // The field is unreachable !
        logError( BaseMessages.getString( PKG, "PropertyOutput.Log.ErrorFindingField", meta.getValueField() ) );
        throw new KettleException( BaseMessages.getString( PKG, "PropertyOutput.Log.ErrorFindingField", meta.getValueField() ) );
      }

      if ( meta.isFileNameInField() ) {
        String realFieldName = environmentSubstitute( meta.getFileNameField() );
        if ( Utils.isEmpty( realFieldName ) ) {
          logError( BaseMessages.getString( PKG, "PropertyOutput.Log.FilenameInFieldEmpty" ) );
          throw new KettleException( BaseMessages.getString( PKG, "PropertyOutput.Log.FilenameInFieldEmpty" ) );
        }
        data.indexOfFieldfilename = data.inputRowMeta.indexOfValue( realFieldName );
        if ( data.indexOfFieldfilename < 0 ) {

View on GitHub (pinned to f3058517a1)