NiFi Ingest 12.13

# Add File Format Detection

This section describes how to add file format detection, so that only image files are routed to media analysis.

To add file format detection

1. Add an idol.nifi > KeyViewRouteOnFileType processor to the canvas.

2. Click the queue between the KeyViewExtractFiles and KeyViewFilterDocument processor.

   The queue is selected and handles appear so that you can modify the route.

3. Drag the blue destination handle from the KeyViewFilterDocument processor to the KeyViewRouteOnFileType processor.

4. Right-click the KeyViewRouteOnFileType processor and click Configure.

   The Configure Processor dialog box opens.

5. Click the Properties tab and set the following properties:

   KeyView Filter Service | Select the KeyView filter service that you created in Add a KeyView Service.
   IDOL License Service | The name of the IDOL License Service that you created in Create a License Service.

6. Add a new property to route image files. With this processor, each property you create defines a new relationship (for more information, see the documentation for the KeyViewRouteOnFileType processor).

   1. Click Add property .

      The Add Property dialog box opens.

   2. Type a name for the property, for example `images`, and click OK.

      Another dialog box opens, so that you can set the value of the property.

   3. Specify the value `5,83,143,238` and click OK. These numbers are KeyView format codes (5 for BMP files, 83 for TIFF, 143 for JPEG, and 238 for PNG).

7. Click APPLY.

8. Create a connection between the KeyViewRouteOnFileType processor and the KeyViewFilterDocument processor.

   The Create Connection dialog box opens.

9. In the For Relationships area, select the unmatched and unknown check boxes:

   - unmatched - all file types that were successfully identified by KeyView, but did not match a property that you configured. In this example, this includes all files that were successfully identified but are not BMP, TIFF, JPEG, or PNG files.
   - unknown - all file types that KeyView could not identify.

10. Click ADD.

    The connection appears on the canvas. Any FlowFile that is processed successfully but does not represent a BMP, TIFF, JPEG, or PNG file is now routed to the KeyViewFilterDocument processor (as before). FlowFiles that represent one of the image formats are no longer routed to the KeyViewFilterDocument processor because you did not select the images relationship.

    The following sections describe how to add media analysis to process the image files.

© Copyright 2018-2022 Micro Focus or one of its affiliates
Version 12.13 | Last updated October 2022

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 swpdl.idoldocsfeedback@microfocus.com.

We appreciate your feedback!

Product: IDOL NiFi Ingest 12.13

Topic Title: Add File Format Detection