{"record":{"id":"8b676b4730c49c75","repo":"pentaho/pentaho-kettle","slug":"autodoc-exception-filetypefieldnotfound","errorCode":"AutoDoc.Exception.FileTypeFieldNotFound","errorMessage":"AutoDoc.Exception.FileTypeFieldNotFound","messagePattern":"AutoDoc\\.Exception\\.FileTypeFieldNotFound","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/autodoc/AutoDoc.java","lineNumber":152,"sourceCode":"      data.outputRowMeta = getInputRowMeta().clone();\n      meta.getFields( getTransMeta().getBowl(), data.outputRowMeta, getStepname(), null, null, this, repository,\n        metaStore );\n\n      // Get the filename field index...\n      //\n      String filenameField = environmentSubstitute( meta.getFilenameField() );\n      data.fileNameFieldIndex = getInputRowMeta().indexOfValue( filenameField );\n      if ( data.fileNameFieldIndex < 0 ) {\n        throw new KettleException( BaseMessages.getString(\n          PKG, \"AutoDoc.Exception.FilenameFieldNotFound\", filenameField ) );\n      }\n\n      // Get the file type field index...\n      //\n      String fileTypeField = environmentSubstitute( meta.getFileTypeField() );\n      data.fileTypeFieldIndex = getInputRowMeta().indexOfValue( fileTypeField );\n      if ( data.fileTypeFieldIndex < 0 ) {\n        throw new KettleException( BaseMessages.getString(\n          PKG, \"AutoDoc.Exception.FileTypeFieldNotFound\", fileTypeField ) );\n      }\n\n      data.repository = getTrans().getRepository();\n      if ( data.repository != null ) {\n        data.tree = data.repository.loadRepositoryDirectoryTree();\n      }\n\n      // Initialize the repository information handlers (images, metadata, loading, etc)\n      //\n      TransformationInformation.init( getTrans().getRepository() );\n      JobInformation.init( getTrans().getRepository() );\n    }\n\n    // One more transformation or job to place in the documentation.\n    //\n    String fileName = getInputRowMeta().getString( row, data.fileNameFieldIndex );\n    String fileType = getInputRowMeta().getString( row, data.fileTypeFieldIndex );","sourceCodeStart":134,"sourceCodeEnd":170,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/autodoc/AutoDoc.java#L134-L170","documentation":"AutoDoc.processRow throws KettleException 'AutoDoc.Exception.FileTypeFieldNotFound' when the configured file type field is absent from the input row metadata. indexOfValue returns -1 for the fileTypeField name and the step throws. Same family as the filename-field error but for the file type column.","triggerScenarios":"The 'file type field' configured on the AutoDoc step (holding values like 'Transformation' or 'Job') is not present in the incoming row's fields.","commonSituations":"Upstream step renamed/dropped the type column; wrong step configuration after copying an existing AutoDoc step; field only exists on a different hop.","solutions":["Reselect the correct file type field in the AutoDoc step dialog.","Ensure the upstream step outputs the file type column (e.g. from a Get repository names step).","Add or rename the field upstream with Select values if it was changed.","Preview input rows to verify field presence and spelling."],"exampleFix":"// before\nmeta.setFileTypeField(\"typ\"); // not in stream\n// after\nmeta.setFileTypeField(\"filetype\"); // matches upstream column","handlingStrategy":"validation","validationCode":"public static void requireField(RowMetaInterface rowMeta, String fieldName) {\n  try {\n    rowMeta.indexOfValue(fieldName);\n  } catch (KettleValueException e) {\n    throw new IllegalStateException(\"Field not in input stream: \" + fieldName);\n  }\n}\n// call: requireField(inputRowMeta, \"filetype\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep the Get repository names step's type column wired through to AutoDoc unchanged.","Preview the stream to verify the file type field exists before running.","Avoid renaming upstream columns without updating AutoDoc settings."],"tags":["kettle","field-lookup","configuration","runtime"],"backgroundTag":"resource-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"}