unarchive
Unarchives messages according to the selected archive format into multiple messages within a batch.
# Config fields, showing default values
label: ""
unarchive:
format: "" # No default (required)
When a message is unarchived the new messages replace the original message in the batch. Messages that are selected but fail to unarchive (invalid format) will remain unchanged in the message batch but will be flagged as having failed, allowing you to error handle them.
Metadata
The metadata found on the messages handled by this processor will be copied into the resulting messages. For the unarchive formats that contain file information (tar, zip), a metadata field is also added to each message called archive_filename
with the extracted filename.
Fields
format
The unarchiving format to apply.
Type: string
Option | Summary |
---|---|
binary | Extract messages from a binary blob format. |
csv | Attempt to parse the message as a csv file (header required) and for each row in the file expands its contents into a json object in a new message. |
csv:x | Attempt to parse the message as a csv file (header required) and for each row in the file expands its contents into a json object in a new message using a custom delimiter. The custom delimiter must be a single character, e.g. the format "csv:\t" would consume a tab delimited file. |
json_array | Attempt to parse a message as a JSON array, and extract each element into its own message. |
json_documents | Attempt to parse a message as a stream of concatenated JSON documents. Each parsed document is expanded into a new message. |
json_map | Attempt to parse the message as a JSON map and for each element of the map expands its contents into a new message. A metadata field is added to each message called archive_key with the relevant key from the top-level map. |
lines | Extract the lines of a message each into their own message. |
tar | Extract messages from a unix standard tape archive. |
zip | Extract messages from a zip file. |