pentaho/pentaho-kettle · error · KettleException

AutoDoc.Exception.UnknownFileTypeValue

AutoDoc.Exception.UnknownFileTypeValue

Error message

AutoDoc.Exception.UnknownFileTypeValue

What it means

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.

Solutions

  1. Normalize the file type value upstream to exactly 'Transformation' or 'Job' (use a Value Mapper or Replace in string step).
  2. Trim whitespace and handle nulls in the type field before AutoDoc.
  3. If values are extensions, map .ktr -> Transformation and .kjb -> Job upstream.
  4. Add a filter step to route unexpected type values away from AutoDoc.

Example fix

// before (upstream data)
fileType = "KTR";
// after (Value Mapper step)
KTR -> Transformation; KJB -> Job;
Defensive patterns

Strategy: validation

Validate before calling

String t = fileType == null ? "" : fileType.trim();
if (!"Transformation".equalsIgnoreCase(t) && !"Job".equalsIgnoreCase(t)) {
  throw new IllegalStateException("Bad file type value (must be Transformation or Job): " + t);
}

Prevention

When it happens

Trigger: 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.

Common situations: Custom queries producing raw extensions (.ktr/.kjb) instead of the expected names; concatenated or localized type labels; null values from upstream joins.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


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

Appendix: source

Thrown at plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/autodoc/AutoDoc.java:178

      // Initialize the repository information handlers (images, metadata, loading, etc)
      //
      TransformationInformation.init( getTrans().getRepository() );
      JobInformation.init( getTrans().getRepository() );
    }

    // One more transformation or job to place in the documentation.
    //
    String fileName = getInputRowMeta().getString( row, data.fileNameFieldIndex );
    String fileType = getInputRowMeta().getString( row, data.fileTypeFieldIndex );

    RepositoryObjectType objectType;
    if ( "Transformation".equalsIgnoreCase( fileType ) ) {
      objectType = RepositoryObjectType.TRANSFORMATION;
    } else if ( "Job".equalsIgnoreCase( fileType ) ) {
      objectType = RepositoryObjectType.JOB;
    } else {
      throw new KettleException( BaseMessages.getString( PKG, "AutoDoc.Exception.UnknownFileTypeValue", fileType ) );
    }

    ReportSubjectLocation location = null;
    if ( getTrans().getRepository() == null ) {
      switch ( objectType ) {
        case TRANSFORMATION:
          location = new ReportSubjectLocation( fileName, null, null, objectType );
          break;
        case JOB:
          location = new ReportSubjectLocation( fileName, null, null, objectType );
          break;
        default:
          break;
      }
    } else {
      int lastSlashIndex = fileName.lastIndexOf( RepositoryDirectory.DIRECTORY_SEPARATOR );
      if ( lastSlashIndex < 0 ) {
        fileName = RepositoryDirectory.DIRECTORY_SEPARATOR + fileName;

View on GitHub (pinned to f3058517a1)