{"record":{"id":"ddc7e8fd5defaafd","repo":"pentaho/pentaho-kettle","slug":"autodoc-exception-unknownfiletypevalue","errorCode":"AutoDoc.Exception.UnknownFileTypeValue","errorMessage":"AutoDoc.Exception.UnknownFileTypeValue","messagePattern":"AutoDoc\\.Exception\\.UnknownFileTypeValue","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/autodoc/AutoDoc.java","lineNumber":178,"sourceCode":"\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 );\n\n    RepositoryObjectType objectType;\n    if ( \"Transformation\".equalsIgnoreCase( fileType ) ) {\n      objectType = RepositoryObjectType.TRANSFORMATION;\n    } else if ( \"Job\".equalsIgnoreCase( fileType ) ) {\n      objectType = RepositoryObjectType.JOB;\n    } else {\n      throw new KettleException( BaseMessages.getString( PKG, \"AutoDoc.Exception.UnknownFileTypeValue\", fileType ) );\n    }\n\n    ReportSubjectLocation location = null;\n    if ( getTrans().getRepository() == null ) {\n      switch ( objectType ) {\n        case TRANSFORMATION:\n          location = new ReportSubjectLocation( fileName, null, null, objectType );\n          break;\n        case JOB:\n          location = new ReportSubjectLocation( fileName, null, null, objectType );\n          break;\n        default:\n          break;\n      }\n    } else {\n      int lastSlashIndex = fileName.lastIndexOf( RepositoryDirectory.DIRECTORY_SEPARATOR );\n      if ( lastSlashIndex < 0 ) {\n        fileName = RepositoryDirectory.DIRECTORY_SEPARATOR + fileName;","sourceCodeStart":160,"sourceCodeEnd":196,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/autodoc/AutoDoc.java#L160-L196","documentation":"AutoDoc.processRow throws KettleException 'AutoDoc.Exception.UnknownFileTypeValue' when the file type field's value is neither 'Transformation' nor 'Job' (case-insensitive). The step maps the value to a RepositoryObjectType and cannot do so for other strings. It is a data-value validation failure, not a config lookup failure.","triggerScenarios":"Input row's file type field contains a value like 'Trans', 'KTR', 'Job ' with unexpected whitespace, or an empty/null string, so neither equalsIgnoreCase branch matches.","commonSituations":"Custom queries producing raw extensions (.ktr/.kjb) instead of the expected names; concatenated or localized type labels; null values from upstream joins.","solutions":["Normalize the file type value upstream to exactly 'Transformation' or 'Job' (use a Value Mapper or Replace in string step).","Trim whitespace and handle nulls in the type field before AutoDoc.","If values are extensions, map .ktr -> Transformation and .kjb -> Job upstream.","Add a filter step to route unexpected type values away from AutoDoc."],"exampleFix":"// before (upstream data)\nfileType = \"KTR\";\n// after (Value Mapper step)\nKTR -> Transformation; KJB -> Job;","handlingStrategy":"validation","validationCode":"String t = fileType == null ? \"\" : fileType.trim();\nif (!\"Transformation\".equalsIgnoreCase(t) && !\"Job\".equalsIgnoreCase(t)) {\n  throw new IllegalStateException(\"Bad file type value (must be Transformation or Job): \" + t);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Normalize type values upstream with a Value Mapper step (.ktr->Transformation, .kjb->Job).","Trim and null-guard the type field before AutoDoc.","Filter out rows with unrecognized type values instead of letting them fail the step."],"tags":["kettle","invalid-value","data-validation","runtime"],"backgroundTag":"invalid-enum-value","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"}