Skip to content

text file writer

Nathan Richardson edited this page Jan 17, 2019 · 10 revisions
Text File Writer

Icon

metl text writer 48x48 color

Use When

Data needs written to a text based file

Samples

Description

The Text File Writer is used to write data to a text based file.

The Text File Writer can write to one output file either locally or to a remote destination. Text files that are written can be in any format (fixed length, comma delimited, etc.) and can be formatted by an upstream processing component like the Format Delimited and Format Fixed components.

Inbound Message Type

Text Based Message

Output Message Type

Text Based Message

Control Message Handling

Input: If a unit of work boundary is received and no input data messages received and 'Empty File On No Input' is checked then create a blank file. Otherwise create a file with the entity messages received. Once a control message is received or a unit of work boundary is reached then complete the file write process and forward a status text message.

Output: A single control message will be forwarded to downstream components once all messages have been processed through this step.

Properties
Name Description

Resource

The file based resource (either local or remote) on which the file will be written.

Error Suspense Step

Whether to forward failed messages and continue processing. This is the name of a linked component to forward the failed messages to.

Enabled

Path and File

The relative path and file of the file to be written. The relative path and file are concatenated with the absolute path specified in the File based resource

Must Exist

Requires the file to exist prior to writing

Append

Add input data to the end of an existing file

Line Terminator

String to append to the end of each line written to the file

Encoding

Get File Name From Message

If selected, the path and file name to be read will be determined by the payload of the incoming message. If this setting is not selected, the path and file to be read is based on the File Path property.

Param Name For Msg Based File Name

Name of the parameter containing the file to be read.

Empty File On No Input

Output an empty file if no input messages occur

Close On

This defines when to close a file as messages are processed. Values are: UNIT OF WORK - close after full processed completed, MESSAGE - close file after each message processed, ROW - close file after each row of data processed

Log Input

Log Output

Inbound Queue Capacity

Important
Specifying None on the Action on Error does NOT stop the flow from failing when a file cannot be written. It simply specifies what should be done with the file when the error condition does occur.
Clone this wiki locally