Flat file services

Use Flat file services to convert data bytes, data stream, and data string to a document and vice versa.

delimitedDataBytesToDocument

Converts delimited data bytes (byte array) to a document.

Input parameters for delimitedDataBytesToDocument

  • delimitedDataBytes: java.lang.Byte[] - Delimited data in bytes (Byte array) to convert to a document.
  • fieldQualifier: String - The delimiter to use for separating entries in delimitedDataBytes. Default is comma (,).
  • textQualifier: String - The character to use for quoted elements. Default is double quote (").
  • useHeaderRowForFieldNames: String - Consider first line as header row and use the delimited data of this line as property names in the output document.

    Set to:

    • true - The delimited data of first line will be used as the property name in the output document. This is the default.
    • false - column1, column2...columnN will be used as the property name in the output document.
  • skipBOMBytes - The default value is False. Set the parameter to True to ensure proper file parsing and avoid integration issues. When the value is set to true, it automatically skips the ByteOrderMark bytes from the input stream, which includes an encoded ByteOrderMark as its first bytes.

  • encoding: String - The encoding to use while parsing the delimited data.

Output parameters for delimitedDataBytesToDocument

  • document: Document - Document resulting from the conversion of delimitedDataBytes. This document contains document array rows[] corresponding to the delimited data.

delimitedDataStreamToDocument

Converts delimited data stream to a document. The permissible content stream limit is based on your tenancy.

Input parameters for delimitedDataStreamToDocument

  • delimitedDataStream: java.io.InputStream - Delimited data in an input stream to convert to a document.
  • fieldQualifier: String - The delimiter to use for separating entries in delimitedDataStream. Default is comma (,).
  • textQualifier: String - The character to use for quoted elements. Default is double quote (").
  • useHeaderRowForFieldNames: String - Consider first line as header row and use the delimited data of this line as property names in the output document.

    Set to:

    • true - The delimited data of first line will be used as the property name in the output document. This is the default.
    • false - column1, column2...columnN will be used as the property name in the output document.
  • skipBOMBytes - Automatically skips the ByteOrderMark bytes from the input stream which includes an encoded ByteOrderMark as its first bytes.
  • encoding: String - The encoding to use while parsing the delimited data.

Output parameters for delimitedDataStreamToDocument

  • document: Document - Document resulting from the conversion of delimitedDataStream. This document contains document array rows[] corresponding to the delimited data.

delimitedDataStringToDocument

Converts delimited data string to a document.

Input parameters for delimitedDataStringToDocument

  • delimitedDataString: String - Delimited string to convert to a document.

  • fieldQualifier: String - The delimiter to use for separating entries in delimitedDataString. Default is comma (,).

  • textQualifier: String Optional - The character to use for quoted elements. Default is double quote (").

  • useHeaderRowForFieldNames: String - Consider first line as header row and use the delimited data of this line as property names in the output document.

    Set to:

    • true - The delimited data of first line will be used as the property name in the output document. This is the default.

    • false - column1, column2...columnN will be used as the property name in the output document.

  • encoding: String - The encoding to use while parsing the delimited data.

Output parameters for delimitedDataStringToDocument

  • document: Document - Document resulting from the conversion of delimitedDataString. This document contains document array rows[] corresponding to the delimited data.

documentToDelimitedDataBytes

Converts a document to delimited data bytes (byte array object).

Input parameters for documentToDelimitedDataBytes

  • document: Document - Document to be converted to delimited data bytes (byte array object). This document contains document array rows[] corresponding to the delimited data.

  • fieldQualifier: String - The delimiter to use for separating entries in delimitedDataBytes. Default is comma (,).

  • textQualifier: String - The character to use for quoted elements. Default is double quote (").

  • useFieldNamesForHeaderRow: String - The first line in the output delimited data delimitedDataBytes will be constructed using the property names in the input document array document\rows[].

    Set to:

    • true - Property names in the input document array document\rows[] will be used as the first row in the output delimitedDataBytes.

    • false - column1, column2...columnN will be used as the first row in the output delimitedDataBytes.

  • encoding: String - The encoding to use while parsing the delimited data.

Output parameters for documentToDelimitedDataBytes

  • delimitedDataBytes: Object - Delimited data byte array object resulting from the conversion of a document.

documentToDelimitedDataStream

Converts a document to a delimited data stream.

Input parameters for documentToDelimitedDataStream

  • document: Document - Document to be converted to delimited data stream. This document contains document array rows[] corresponding to the delimited data.

  • fieldQualifier: String - The delimiter to use for separating entries in delimitedDataStream. Default is comma (,).

  • textQualifier: String - The character to use for quoted elements. Default is double quote (").

  • useFieldNamesForHeaderRow: String - The first line in the output delimited data delimitedDataStream will be constructed using the property names in the input document array document\rows[].

    Set to:

    • true - Property names in the input document array document\rows[] will be used as the first row in the output delimitedDataStream.

    • false - column1, column2...columnN will be used as the first row in the output delimitedDataStream.

  • encoding: String - The encoding to use while parsing the delimited data.

Output parameters for documentToDelimitedDataStream

  • delimitedDataStream: java.io.InputStream - Delimited data stream resulting from the conversion of a document.

documentToDelimitedDataString

Converts a document to a delimited data string.

Input parameters for documentToDelimitedDataString

  • document: Document - Document to be converted to delimited data string. This document contains document array rows[] corresponding to the delimited data.

  • fieldQualifier: String - The delimiter to use for separating entries in delimitedDataString. Default is comma (,).

  • textQualifier: String - The character to use for quoted elements. Default is double quote (").

  • useFieldNamesForHeaderRow: String - The first line in the output delimited data delimitedDataString will be constructed using the property names in the input document array document\rows[].

    Set to:

    • true- Property names in the input document array document\rows[] will be used as the first row in the output delimitedDataString.

    • false - column1, column2...columnN will be used as the first row in the output delimitedDataString.

  • encoding: String - The encoding to use while parsing the delimited data.

Output parameters for documentToDelimitedDataString

  • delimitedDataString: String - Delimited data byte string resulting from the conversion of a document.