# KeyViewExtractFiles

A processor that uses KeyView to extract sub-files from container files such as zip archives.

The processor reads any files embedded in the FlowFile or referenced by the FlowFile, and passes these to KeyView. If the files are containers, KeyView extracts sub-files to the location defined by the KeyView Filter Service, and either creates a new FlowFile for each sub-file, or adds new parts referencing these files to the original FlowFile. This behavior is controlled by the Create new FlowFiles from sub-files property. If you choose to create new FlowFiles, the metadata and attributes associated with the parent FlowFile are inherited by the child.

## Properties

Name | Default Value | Description
--- | --- | ---
KeyView Filter Service |  | A ControllerService that manages the location of the KeyView binaries and temporary file storage.
IDOL License Service |  | An IdolLicenseService that provides a way to communicate with an IDOL License Server.
Document Registry Service |  | A DocumentRegistryService controller service that manages and updates a document registry database. This ensures that documents are indexed in the correct order. This processor registers new FlowFiles that represent extracted subfiles.
Create new FlowFiles from sub-files | True | A Boolean value that specifies whether to create a new FlowFile for each extracted sub-file. If you set this property to false, the processor associates sub-files with the original FlowFile.
Inherited Fields Regex | `.*` | A regular expression to choose metadata fields that documents representing sub-files should inherit from their parent document.
Not Inherited Fields Regex |  | A regular expression to choose metadata fields that documents representing sub-files should not inherit from their parent document.

## Relationships

Name | Description
--- | ---
success | Successfully processed FlowFiles are routed to this relationship. When Create new FlowFiles from sub-files is set to false, the FlowFiles can contain extra attributes referencing extracted sub-files.
subfile | Receives new FlowFiles that represent extracted sub-files. This relationship exists only when you set the property Create new FlowFiles from sub-files to true.
failure | FlowFiles that were not processed successfully. For example a FlowFile was provided but had an invalid or unknown format.

## Extract Subfiles Recursively

When you set Create new FlowFiles from sub-files to true, the processor does not extract subfiles recursively. For example, if a zip file contains another zip, the second zip is not automatically extracted. If you want to extract subfiles recursively, connect the subfile relationship back to the KeyViewExtractFiles processor so that new FlowFiles representing extracted subfiles are processed in the same way as the original FlowFiles. Eventually, all of the containers will be extracted and all of the resulting FlowFiles will be routed to the success relationship. For example:

When you set Create new FlowFiles from sub-files to false, the processor automatically extracts subfiles recursively. In this case the subfile relationship does not exist.

© Copyright 2018-2019 Micro Focus or one of its affiliates | Send documentation feedback Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a mail client, and then send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm