KeyViewRouteOnFileType

A processor that uses KeyView to route FlowFiles based on the format of the associated file. The processor also writes attributes into the FlowFile, containing the KeyView document class, KeyView format code, and a MIME type string.

Properties

Name Description
KeyView Filter Service A ControllerService that manages the location of the KeyView binaries and temporary file storage.
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 KeyView document class, a KeyView format code, or a MIME-type string.

For example:

  • The KeyView 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 KeyView 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 KeyView format codes for BMP, TIFF, JPEG, and PNG files, respectively).

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 KeyView 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.

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 KeyView.
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.


_FT_HTML5_bannerTitle.htm