Text File Parser icon

Text File Parser

Text dosyalarını oku ve parse et

Overview

This node, named 'Text File Parser', is designed to read and parse text files in various ways. It supports three main operations: reading the entire content of a text file from binary input, parsing a text file with fixed-length fields, and mapping content fields from source fields. It is useful in scenarios where users need to extract and transform text data from files, such as processing logs, fixed-format reports, or any text-based data files. For example, it can read a binary file input and output its text content, or parse structured text files with headers and footers, or map specific fields from the text content into structured JSON objects.

Use Case Examples

  1. Reading a binary text file input and outputting its UTF-8 content as JSON.
  2. Parsing a fixed-length formatted text file with optional header and footer lines to extract structured data.
  3. Mapping specific fields from a text content field into separate JSON properties based on defined start positions and lengths.

Properties

Name Meaning
Input Binary Field The name of the input field containing binary data to read as text. Required for the 'Read Text File' operation.

Output

JSON

  • content - The UTF-8 decoded text content of the file.
  • fileName - The name of the file, if available from the binary data or input.

Dependencies

  • Requires access to binary data input and uses helper methods to read binary streams and convert to text.

Troubleshooting

  • Error 'Binary data is empty' occurs if the specified binary input field has no data; ensure the correct binary field name is provided and contains data.
    Error 'Text content field "" not found' occurs if the specified text field does not exist in the input JSON; verify the field name and input data structure.
  • Error 'File content is empty' occurs if the file content could not be read or is empty; check the input data and binary field.
  • Parsing errors may occur if the text file format does not match the expected fixed-length or header/footer configuration; verify parser options and input file format.

Discussion