Description
The DelimitedFileReceiver writes Domain Attribute values in a delimited format to a file.
In This Article
- Receiver Parameters
- Using Multiple Header Configuration File
- Receiver Attribute Property Keys
- Delimiter
- QuoteTextData
- File Config Tab
- Directory Config Tab
- Example Domain
- Example Single-Row Header Without Configuration File
- Example Configuration File
- Example Multi-Row Header With Configuration File
Receiver Parameters
The following parameters can be defined for the DelimitedFileReceiver. Items with an asterisk (*) are required.
- path* - Defines the location to store the newly generated delimited output file.
- subDir - Defines the subdirectory location to store the newly generated delimited output file.
- fileName* - Defines the name of the output file.
- uniqueAttribute - Defines a Domain Attribute the Receiver will use to identify a unique value that has already been inserted into the file and prevents it from being inserted twice.
- delimiter* - Defines the character used as the column delimiter.
- headerFilePath - Defines the path to an XML configuration file with header information.
- headerFileName - Defines the name of the XML configuration file that has header information.
- quoteTextData - Defines the character to use when quoting text data.
- booleanValue* - Format a Boolean object with the selected mask.
- nullValue* - Represents a Null value.
- includeHeader* - Defines whether to include the header in the delimited file or not.
- appendToFile* - Determines whether the file will open in append mode. If true, rows will be appended to the file; otherwise, the file will be overridden.
Using Multiple Header Configuration File
The DelimitedFileReceiver has two optional parameters that allow it to read from an XML configuration file that defines one or more header rows for the delimited file output.
When these two parameters are left empty, the DelimitedFileReceiver will automatically use each Attribute's originalName parameter to define a one-row header in the delimited file output.
- headerFilePath - Defines the path to an XML configuration file with header information.
- headerFileName - Defines the file name of the XML configuration file that has header information.
Receiver Attribute Property Keys
The Receiver defines two property keys that can be modified on any of its associated Domain Attributes:
- columnName - Defines the column name as it will be output in the delimited file header.
- include - Determines if the Attribute will be included as a column in the output.
Delimiter
This Receiver allows for three delimiter types:
- Tab - \t
- Pipe - |
- Comma - ,
The Tab delimiter is the default delimiter.
QuoteTextData
This Receiver allows for three quoteTextData types:
- None - text
- Single - 'text'
- Double - "text"
File Config Tab
The File Config Tab is used to configure what event will trigger file creation and the naming configuration for generated files. Please click here if you would like more information on how to use the File Config Tab.
The example below will create a new file for every 100 records. The naming for each file will look like Output-1.txt, Output-2.txt, Output-3.txt, and so on.
Directory Config Tab
The Directory Config Tab is used to configure what event will trigger directory creation and the naming configuration for generated directories. Please click here if you would like more information on how to use the Directory Config Tab.
In the example below, a subdirectory will be created for every 10 files. Each subdirectory's naming will look like AddressFiles1, AddressFiles2, AddressFiles3, and so on.
Example Domain
The example outputs are based on the following Domain defined below:
Example Single-Row Header Without Configuration File
The following is an example output of a Tab-delimited file without an XML configuration file, and the value of each Attribute's originalName is used to define the single-row header:
Example Configuration File
The following is an example XML configuration file that defines a three-row header for each of the User Domain columns:
<headers>
<attribute name='id'>
<column></column>
<column></column>
<column>ID</column>
</attribute>
<attribute name='firstName'>
<column></column>
<column>First</column>
<column>Name</column>
</attribute>
<attribute name='lastName'>
<column></column>
<column>Last</column>
<column>Name</column>
</attribute>
<attribute name='emailAddress'>
<column>User </column>
<column>Email</column>
<column>Address</column>
</attribute>
<attribute name='username'>
<column></column>
<column></column>
<column>username</column>
</attribute>
<attribute name='password'>
<column></column>
<column></column>
<column>password</column>
</attribute>
</headers>
Example Multi-Row Header With Configuration File
The following is an example output of a Tab-delimited file with the XML configuration file defined above: