NiFi Ingest 26.3
NiFi Ingest

# KeyViewRouteOnFileType

A processor that uses File Content Extraction to route FlowFiles based on the format of the associated file. The processor also adds fields to the document metadata, containing the document class, file format code, and a MIME type string.

NOTE: The processor only writes information about the file format to the document metadata when you license the processor with a License Server.

## Properties

Name | Description
--- | ---
KeyView Filter Service | A KeyViewFilterServiceImpl that manages the location of the Filter SDK binaries and temporary file storage.
IDOL License Service | An IdolLicenseServiceImpl that provides a way to communicate with a Knowledge Discovery License Server.
Document Registry Service | A DocumentRegistryServiceImpl controller service that manages and updates a document registry database. The processor unregisters any FlowFiles that are discarded as a result of matching the "Discard File Types" property.
Routing Scheme | Specifies how to route FlowFiles: Media - Media files are routed to a relationship named "media", other known formats are routed to "unmatched", and unknown formats are routed to "unknown". Media files are files that belong to document class 4 (raster image), 9 (sound), or 20 (movie). In this mode you cannot set Discard File Types or define custom relationships. Custom - You define relationships for the file types that you want to route, as described below.
Discard File Types | The processor discards any FlowFiles where the associated file matches these file types. You can specify a document class, a format code, or a MIME-type string (in the same way as for dynamic properties, below). The easiest way to configure the processor and select the file types to discard is by using the advanced configuration interface (right-click the processor and click Advanced).
outgoing_relationship_name | You can add as many custom properties as you need. Each one defines a new outgoing relationship. You can specify the files to route to that relationship using a document class, a format code, or a MIME-type string. For example: The document class for word processor files is `1`, so to route all word processor files to the relationship `WordProcessorFiles`, add a property named `WordProcessorFiles` and set the value to `${file.keyview.class:equals('1')}`. The file format code for PDF files is `230`, so to route all PDF files to the relationship `PDFFiles`, add a property named `PDFFiles` and set the value to `230`. The content-type for Microsoft Excel files is `application/x-ms-excel`, so to route all Excel files to the relationship `MyExcelFiles`, add a property named `MyExcelFiles` and set the value to `application/x-ms-excel`. You can route multiple file types to a single relationship. For example, you could create a property named `ImageFiles` and set the value to `5,83,143,238` (the file format codes for BMP, TIFF, JPEG, and PNG files, respectively). The easiest way to configure the processor and select the file types to route is by using the advanced configuration interface (right-click the processor and click Advanced). Do not configure properties with overlapping formats. FlowFiles that match more than one property are routed to the "failure" relationship. For example, this could occur if you have one property that matches the word processor document class and another property that matches the Microsoft Word format code.

## Relationships

Name | Description
--- | ---
failure | A failure occurred while attempting to detect the file format of a file referenced or contained by the FlowFile. A failure can occur when the FlowFile has an invalid format. A FlowFile is also routed to the "failure" relationship when: An associated file matches more than one property that you have configured. It has more than one associated file, and these would individually be routed to different relationships. Other types of failure result in the FlowFile being returned to the incoming queue.
media | This relationship is available only when you set Routing Scheme to "Media". It is equivalent to adding a custom property named "media" with the value `${file.keyview.class:in('4','9','20')}`.
property_name | The file format matches exactly one of the properties you configured. The FlowFile is routed to the relationship with the corresponding name.
unknown | The file format is not known to File Content Extraction.
unmatched | The file format is known but does not match any of the properties that you have configured, or the FlowFile has no associated file.

NOTE: A FlowFile that has multiple associated files that would individually be routed to the same outgoing relationship is routed as a whole to that relationship.

## Guided Setup

OpenText recommends configuring the processor using the guided setup wizard (right-click the processor and click Advanced). If you choose the "custom" routing mode, the guided setup wizard allows you to create output relationships and route file formats to those relationships. You can also select one, several, or all file formats from preset groups, which include:

- Compressed Archive - All compressed archive file types, for example zip, 7z, TAR, RAR
- Media (All) - All media file types supported by Media Server
- Media (Audio) - All audio file types supported by Media Server
- Media (Image) - All image file types supported by Media Server
- Media (OCR) - All file types that can be processed by OCR
- Media (STT) - All file types that can be processed by speech-to-text
- Media (Video) - All video file types supported by Media Server
- Office - All 'Office' file types (Publishing, word processor, spreadsheet, presentation, and so on)

All file formats that are in multiple classes (for example TIFF) are shown in the UI under both classes. When these formats are selected, a detected file is routed only if both the file class and file format match.

Copyright 2018-2026 Open Text
Version 26.3 | Last updated July 2026

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: Knowledge Discovery NiFi Ingest 26.3

Topic Title: KeyViewRouteOnFileType