Integration Cloud 6.6.0 | Applications | Flat File Applications | Flat File Predefined Operations | convertFlatFileToDocument
 
convertFlatFileToDocument
Converts a flattened flat file data into a structured data, which will conform to the document type associated with the flat file Application.
Input Variables
ffDataString
String The flat file input with type of String.
ffData
Object The flat file input with type of InputStream or ByteArray. If both ffData and ffDataString are parsed, ffDataString takes precedence.
ffIterator
Object Optional. An object that encapsulates and keeps track of the input data during processing. It is used only when the iterate variable has been set to true.
encoding
String Optional. The encoding of the InputStream passed in to ffData. The default encoding is UTF–8.
delimiters
Document Optional. A document object that contains the segment terminator and the field and subfield separators. If the delimiter is null, it will be located using the information defined in the definition and structure of the Flat File Application. To specify a delimiter, you can specify:
*One character or character representation (for example, *, \n for line terminator, \t for tab)
*The space character
Variable
Description
record
String Character used to separate records. If you want to specify the two–character carriage return line feed (CRLF) characters, specify \r\n.
field
String Character used to separate fields.
subfield
String Character used to separate subfields.
release
String Character used to ignore a record, field, or subfield delimiter in a field. If a release character occurs in a field or subfield before the delimiter, it will be prefixed with the release.
quotedRelease
String Character to use to ignore a record, field, or subfield delimiter in a field. If a quoted release character occurs in a field or subfield before the delimiter, it will be prefixed with quotedRelease before being written to the output string. The string is pre- and appended with the quoted release character.
For example, if * is a delimiter, the field value is a*b, and the quoted release character is “, the string appears as “a*b”.
iterate
String Optional. Whether you want to process the input all at one time.
createIfNull
String Optional. Whether to create the document object if all the fields are null.
skipWhiteSpace
String Optional. Whether white space at the beginning of records will be ignored.
keepResults
String Optional. Whether to return the parsed data.
validate
String Optional. Whether to return error messages that describe how ffData differs from the definition and structure of the Flat File Application.
returnErrors
String Optional. Whether to return the validation errors.
maxErrors
String Optional. The maximum number of errors that can be returned from one record. When the flat file parser encounters more than the maximum number of errors within a record, the parser will stop parsing and return the parsed data and errors processed up until that point.
flags
String Optional. Flags that you can set to govern convertFlatFileToDocument options.
Variable
Description
addRecordCount
String Whether you want the operation to add an additional field (@record–count) to each parsed record in the resulting document object.
detailedErrors
String Whether you want detailed conditional validation error information.
skipToFirstRecord
String Whether you want the operation to wait until it finds the first valid record before reporting invalid records as errors.
trimWhitespace
String Whether you want the operation to delete any blank spaces at the beginning of fields, at the end of fields, or both.
resultAsArray
String Whether you want the operation to return the document object that represents the input flat file data as a document reference that can be mapped to the document types generated.
Output Variables
<flatfile_application_name>_dt
Document The name of the output document will be flatfile_application_name_dt, where flatfile_application_name is the name of the flat file Application. For example, if the Application name is test, then the name of the output document will be test_dt. The structure of the output document will be similar to what you have defined in your Flat File Application.
isValid
String Whether flat file contains validation errors.
errors
String Optional. An array containing the validation errors, if any, that were found in ffData or ffDataString.