Table of Contents

CSVFileExportValve

Warning

This valve is blocking - this may hurt throughput and cause performance issues since other pipes won't be able to execute while this valve is waiting on a long-running operation in the same instance of the pipes module, for example due to a network request, disk access or similar. Try to limit the usage of blocking valves, try to ensure that they are fast to execute, and if needed, consider deploying multiple instances of the pipes module.

Note

Valve for exporting items to a Character-Separated File (CSV) as defined in RFC 4180.

Output values can be separated by any character. Records are separated by line break (CRLF).

If header is written or not, is controlled by content_type property (header parameter).

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
overwrite_existing Flag controlling if existing file should be overwritten or not. false No No
separator Value separator character. ',' No No
attributes List of attributes to output. Also specifies the order of values in output. Default: All available properties in all items. No No
content_type The content type of the output file. text/csv;charset=utf-8;header=present No No
dest_id Name of destination column containing item id. id No No

Example Configuration

{
    "name": "CSVFileExportValve",
    "config": { 
        "path":"C:\\Windows\\Temp\\file.csv",
        "separator" : "|"
    }
}