{"record":{"id":"adb73b9a90aa0211","repo":"pentaho/pentaho-kettle","slug":"propertyoutput-log-errorfindingfield","errorCode":null,"errorMessage":"PropertyOutput.Log.ErrorFindingField","messagePattern":"PropertyOutput\\.Log\\.ErrorFindingField","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/propertyoutput/PropertyOutput.java","lineNumber":76,"sourceCode":"\n    if ( r == null ) { // no more input to be expected...\n      setOutputDone();\n      return false;\n    }\n\n    if ( first ) {\n      first = false;\n      data.inputRowMeta = getInputRowMeta();\n      data.outputRowMeta = data.inputRowMeta.clone();\n      meta.getFields( getTransMeta().getBowl(), data.outputRowMeta, getStepname(), null, null, this, repository,\n        metaStore );\n\n      // Let's take the index of Key field ...\n      data.indexOfKeyField = data.inputRowMeta.indexOfValue( meta.getKeyField() );\n      if ( data.indexOfKeyField < 0 ) {\n        // The field is unreachable !\n        logError( BaseMessages.getString( PKG, \"PropertyOutput.Log.ErrorFindingField\", meta.getKeyField() ) );\n        throw new KettleException( BaseMessages.getString( PKG, \"PropertyOutput.Log.ErrorFindingField\", meta.getKeyField() ) );\n      }\n\n      // Let's take the index of Key field ...\n      data.indexOfValueField = data.inputRowMeta.indexOfValue( meta.getValueField() );\n      if ( data.indexOfValueField < 0 ) {\n        // The field is unreachable !\n        logError( BaseMessages.getString( PKG, \"PropertyOutput.Log.ErrorFindingField\", meta.getValueField() ) );\n        throw new KettleException( BaseMessages.getString( PKG, \"PropertyOutput.Log.ErrorFindingField\", meta.getValueField() ) );\n      }\n\n      if ( meta.isFileNameInField() ) {\n        String realFieldName = environmentSubstitute( meta.getFileNameField() );\n        if ( Utils.isEmpty( realFieldName ) ) {\n          logError( BaseMessages.getString( PKG, \"PropertyOutput.Log.FilenameInFieldEmpty\" ) );\n          throw new KettleException( BaseMessages.getString( PKG, \"PropertyOutput.Log.FilenameInFieldEmpty\" ) );\n        }\n        data.indexOfFieldfilename = data.inputRowMeta.indexOfValue( realFieldName );\n        if ( data.indexOfFieldfilename < 0 ) {","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/propertyoutput/PropertyOutput.java#L58-L94","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","solutions":["Open the Property Output step dialog and set Key Field to a field that actually exists in the incoming stream.","Use 'Get Fields' in the step dialog so it pulls real field names from the hop.","Check upstream steps (Select Values, Calculator, etc.) for renames/deletions of the key field.","Preview the input rows (right-click step > Preview) to confirm which fields reach this step."],"exampleFix":"// before (step XML/dialog)\n<key_field>kye_name</key_field>\n// after\n<key_field>key_name</key_field>  <!-- must exactly match an upstream field name -->","handlingStrategy":"validation","validationCode":"// in a custom check before running the transformation\nString keyField = propertyOutputMeta.getKeyField();\nRowMetaInterface rmi = transMeta.getPrevStepFields(propertyOutputStepMeta);\nif (rmi == null || keyField == null || rmi.indexOfValue(keyField) < 0) {\n  throw new KettleException(\"Key field '\" + keyField + \"' missing from input stream\");\n}","typeGuard":"boolean hasField(RowMetaInterface rmi, String name) {\n  return rmi != null && name != null && rmi.indexOfValue(name) >= 0;\n}","tryCatchPattern":"try {\n  trans.execute(transName);\n} catch (KettleException e) {\n  if (String.valueOf(e.getMessage()).contains(\"PropertyOutput.Log.ErrorFindingField\")) {\n    logError(\"Check the Property Output Key Field setting: \" + e.getMessage());\n  }\n}","preventionTips":["Always configure Key Field via the dialog's field selector, never free-hand typing.","Preview rows after any upstream schema change.","Field names are case-sensitive; verify exact match.","Re-check settings after copying steps between transformations."],"tags":["kettle","etl","field-lookup","configuration","property-output"],"backgroundTag":"entity-not-found","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"}