FileWriteValve

Valve to write an item property to a file.

Valve operates on the Current Item Set and will be executed on every item.

Configuration property content_type determines if the source value is a decoded binary; if content_type is text (matches content type: 'text/*'), value is treated as plain text, otherwise value is assumed binary and base64 decoded before written to file.

File will be written using the charset specified in the charset parameter in content_type. If charset isn’t specified, the default charset will be used.

Valve operates on the Current Item Set and will process all Items surviving the common item filtering rules.

Properties

Name Description Default value Mandatory Supports property expansion
path The path of file to write. Yes No
source The source property of the current item. Yes No
content_type Content type of output. text/plain;charset=utf-8 No No
overwrite_existing Flag controlling if existing file should be overwritten or not. false No No

Example Configuration

{
        "name": "FileWriteValve",
        "config": { 
              "path":"C:\\Windows\\Temp\\file.txt",
              "source":"data_to_export"
        }
}

Requirements

Item set must have at least one entry.