StructuredDataWriter

We assume that you have already learned what is described in:

If you want to find the right Writer for your purposes, see Writers Comparison.

Short Summary

StructuredDataWriter writes data to files with user-defined structure.

Component Data output Input ports Output ports Transformation Transf. required Java CTL
StructuredDataWriterstructured flat file1-30-1nononono

Abstract

StructuredDataWriter writes data to files (local or remote, delimited, fixed-length, or mixed) with user-defined structure. It can also compress output files, write data to console, output port, or dictionary.

Icon

Ports

Port typeNumberRequiredDescriptionMetadata
Input0yesRecords for bodyAny
1noRecords for headerAny
2noRecords for footerAny
Output0noFor port writing. See Writing to Output Port.One field (byte, cbyte, string).

StructuredDataWriter Attributes

AttributeReqDescriptionPossible values
Basic
File URLyesAttribute specifying where received data will be written (flat file, console, output port, dictionary). See Supported File URL Formats for Writers. 
Charset Encoding of records written to the output.ISO-8859-1 (default) | <other encodings>
Append By default, new records overwrite the older ones. If set to true, new records are appended to the older records stored in the output file(s).false (default) | true
Body mask Mask used to write the body of the output file(s). It can be based on the records received through the first input port. See Masks and Output File Structure for more information about definition of Body mask and resulting output structure.Default Body Structure (default) | user-defined
Header mask1)Mask used to write the header of the output file(s). It can be based on the records received through the second input port. See Masks and Output File Structure for more information about definition of Header mask and resulting output structure.empty (default) | user-defined
Footer mask2)Mask used to write the footer of the output file(s). It can be based on the records received through the third input port. See Masks and Output File Structure for more information about definition of Footer mask and resulting output structure.empty (default) | user-defined
Advanced
Create directories By default, non-existing directories are not created. If set to true, they are created.false (default) | true
Records per file Maximum number of records to be written to one output file.1-N
Bytes per file Maximum size of one output file in bytes.1-N
Number of skipped records Number of records to be skipped. See Selecting Output Records.0-N
Max number of records Maximum number of records to be written to all output files. See Selecting Output Records.0-N
Partition key Key whose values define the distribution of records among multiple output files. See Partitioning Output into Different Output Files for more information. 
Partition lookup table1)ID of lookup table serving for selecting records that should be written to output file(s). See Partitioning Output into Different Output Files for more information. 
Partition file tag By default, output files are numbered. If it is set to Key file tag, output files are named according to the values of Partition key or Partition output fields. See Partitioning Output into Different Output Files for more information.Number file tag (default) | Key file tag
Partition output fields1)Fields of Partition lookup table whose values serve to name output file(s). See Partitioning Output into Different Output Files for more information. 
Partition unassigned file name Name of the file into which the unassigned records should be written if there are any. If not specified, data records whose key values are not contained in Partition lookup table are discarded. See Partitioning Output into Different Output Files for more information. 

Legend:

1) Must be specified if second input port is connected. However, does not need to be based on input data records.

2) Must be specified if third input port is connected. However, does not need to be based on input data records.

Advanced Description

Masks and Output File Structure