Description

The FixedFileReceiver writes Domain Attribute values in a fixed format to a file. Column Name and fixed length are defined through Receiver Attribute Property keys. 


In This Article


Receiver Parameters

The following parameters can be defined for the FixedFileReceiver. Items with an asterisk (*) are required: 

  • outputPath* - Defines the location to store the newly generated fixed output file.
  • subDir - Defines the sub-directory location to store the newly generated output file.
  • outputFileName* - Defines the name of the output file.
  • lineSeparator - Defines a line separator, which will be appended at the end of each line. 
  • delimiter - Defines the character used as the column delimiter.
  • quoteTextData* - Defines the character to use when quoting text data.
  • includeHeader* - Defines whether to include the header in the Fixed File or not.


Line Separator

This Receiver allows a line separator to be used within the fixed file. Here are some examples: 

  • \n
  • \r
  • \r\n


Delimiter

This Receiver allows for a delimiter to be placed at the end of each column in a record. Here are some examples: 

  • Tab - \t
  • Pipe - |
  • Comma - ,  


QuoteTextData

This Receiver allows for three quoteTextData types:

  • None - text
  • Single - 'text'
  • Double - "text"


Receiver Attribute Property Keys

The Receiver defines three 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. 
    • Note - Users can enter #{BLANK} for a Blank value in Header and #{EMPTY} for no value in Header This should be done when the column header for a specific Attribute should not appear in the output file or when there is no value in the Header. 
  • include - Determines if the Attribute will be included as a column in the output.
  • length - Defines the fixed length for each Attribute.



Use Case 1 - Generate Fixed File Format Output with Header and Line Separator

The example output for this use case is based on the following Domain: 



For this example, the file has been named "user" and includes headers with a line separator \n. The headers will appear at the top of the file, and the line separator ensures that each record will appear on a separate line in the output file. 



The length has been defined for each Attribute, as shown below: 



Sample Output

The following is an example output of User Domain generated data and fixed file formatted output from the FixedFileReceiver configuration shown above:



Use Case 2 - Generate Fixed File Output with "Last Name" not in File Header

This use case builds on Use Case 1 above. An additional step must be completed to ensure the "Last Name" header does not appear in the output file. All other setup steps are the same. Please take a look at Use Case 1 above to learn more.


The user will need to perform the following additional steps: 

  • Select the lastName Attribute within the Receiver Dashboard.


  • Enter #{BLANK} for the columnName parameter.
  • Click Save to save changes.


    Note - For this example, the column header for firstName will also be changed to "Name."


Sample Output

As shown below, "Name" is used as the header for the firstName Attribute, and "Last Name" does not appear as a header in the output file.