Filesystem: Write file Transformer

Table of contents

  • General description
  • The different parts of the Filesystem: Write file Transformer

General description

This Filesystem: Write file Transformer can be used to write context data to a file. Typically, it’s recommended to use a publisher at the end of a Route to write the entity to a file by using the Files Publisher.

The different parts of the Filesystem: Write file Transformer

  • Filesystem (required field)
    The system offers several types of file systems that can be used, allowing users to choose the most suitable one based on their needs. Based on the selected type, additional configuration might be needed.

  • When the file exists (required field)
    This field helps determine what to do when the file already exists, with options to either overwrite it or find an alternative filename. Overwriting could obviously result in the loss of data. Additional configuration might be required based on the chosen option.

The two options available:

  • Overwrite
    When the output file already exists, it will be overwritten, risking data loss.

  • Add an increasing number to the filename
    Keeps increasing a number in the filename. The format can be influenced based on a template, with many configuration options available.

  • File path and contents

    • Path Source (required field)
      This field describes the source where the Transformer will receive the path to store the file from.

There are two options:
* Get path from the data:
If there is a path provided in the context data, it can be set here. The filename must be included in the path.
* Custom path
This is a text field where the output path can be set, with the filename included in the path. The field supports the placeholders, allowing the path and filename to be dynamically built based on context data. Please note that this is not the source of the data that will be written to the file.

  • Contents source (required field)
    This describes the source of the content that will be put inside the file. It includes two options:
    • Get contents from the data
      Enter a path that points towards the data in the context data.
    • Custom contents
      Allows for custom content that can be placed inside the contents field. It supports placeholders to get data from the entity context. A mapper can be applied to convert the data to other formats, for example, JSON OR XML.