Function Description of File Output Operator

  • Last update: December 17, 2025
  • Overview

    Version

    FineDataLink Version Functional Change
    4.0.26Added the File Output operator, which exports data to CSV files.
    4.0.30Data can be exported to Excel files.
    4.1.4When data is exported in CSV format, the file extension for the exported file is customizable, for example: .txt.log, or .tsv.
    4.2.10.3

    1. Added support for exporting data to custom file types.

    2. If you choose to export data to an Excel file:

    You can select Append Data to Existing File for Duplicate Handling Strategy.

    The file splitting function now supports splitting data into multiple sheets by row count.

    3. Field mapping allows modifying field names and field types.

    4.2.11.3When the file type is CustomValue Source is renamed to File Content, and Specified Column/Specified Row is renamed to Source Column/Source Row.

    Application Scenario

    • You intend to share the processed data in the file format, allowing business personnel to view and use it directly.

    • In the banking system, direct database access and open APIs are prohibited, so data must be distributed as files to other related business systems. 

    • When sharing data between the government and enterprises, data must be archived in a file format.

    • When connecting to certain big data sources, you need to use FineDataLink to write data files, which are then read and quickly loaded by the data sources.

    • Exporting data to custom file types is now supported. Single-row and single-column XML/JSON data can be output directly in its original format for subsequent operations.

    • Output data can be split into multiple sheets by row count, which is suitable for large-volume file output scenarios.

    The File Output operator applies to the above scenarios.

    Function Description

    The File Output operator outputs the processed data to structured files in specified destinations and paths, as shown in the following figure.

    iconNote:
    If data doesn't require complex processing, you can use the Data Synchronization node to export data as files.

    Prerequisite

    • To output files to FineDataLink, you must have created a data connection to the local server directory, placed the files to be read in the FineDataLink Installation Directory/webroot/WEB-INF/assets/local_files path of the FineDataLink project, and had permission to use the data connection. For details, see Data Connection to Local Server Directory.

    • To export files to FTP/SFTP servers, you need to configure an FTP/SFTP data connection and have permission to use the data connection. For details, see FTP/SFTP Data Connection.

    Function Description

    iconNote:
    Avoid writing multiple tasks or nodes to the same file simultaneously.

    Exporting Data to CSV Files

    The following figure shows the setting page.

    File Target

    The location where the file will be output. Files can be output to an FTP/SFTP server or to a local directory on the server.

    File Type

    Data can be exported as CSV or Excel files.

    Folder Address

    Select the file output directory. The path selected in Data Connection will be used as the directory for writing files. Folder Address cannot be empty and supports entering parameters.

    File Name

    1. Enter the file name. File Name cannot be left empty and supports entering parameters.

    2. For version 4.1.4 and later, the file name suffix can be customized.  You can enter extensions such as txt, log, tsv, etc., which are case-insensitive. The file name suffix can be empty, as shown in the following figure.

    Column Separator

    iconNote:
    Column separator, text qualifier, and line separator cannot be duplicates of each other.

    You can specify the column separator to split data into multiple columns.

    You can select the separator from Comma (,), Tab (\t), Semicolon (;), Vertical Bar (|), Space, and ASCII Character, or select Custom.

    ASCII Character: You can manually enter decimal ASCII codes to specify ASCII characters as special column separators. Supported decimal ASCII codes range from 0 to 32.

    The meanings of the decimal ASCII codes 0 to 32 are shown in the following table:

    Decimal ASCII Code Meaning
    0Null character (Null)
    1Start of Heading
    2Start of Text
    3End of Text
    4End of Transmission
    5Enquiry
    6Acknowledge
    7Bell
    8Backspace
    9Horizontal Tab
    10Line Feed
    11Vertical Tab
    12Form Feed
    13Carriage Return
    14Shift Out
    15Shift In
    16Data Link Escape
    17Device Control 1 (XON, software flow control on)
    18Device Control 2
    19Device Control 3 (XOFF, software flow control off)
    20Device Control 4
    21Negative Acknowledge
    22Synchronous Idle
    23End of Transmission Block
    24Cancel
    25End of Medium
    26Substitute
    27Escape
    28File Separator
    29Group Separator
    30Record Separator
    31Unit Separator
    32Space

    Line Separator

    You can specify the line separator of the CSV file. 

    • CR + LF: Windows system

    • LF: Unix, Linux, and other systems 

    • CR: Early Mac OS system

    Text Qualifier

    It marks the start and end of a column field to prevent the special character in the field value from being recognized as a separator, thus affecting the CSV file parsing.

    Options include None, Double Quotes, Single Quote, and ASCII Character, as shown in the following figure.

    1765937303oJnf.png

    Specified: You can choose Double Quotes " or Single Quote '.

    Custom: You can manually enter a decimal ASCII code to specify an ASCII character as a special text qualifier. Supported decimal ASCII codes range from 0 to 32. For specific meanings, refer to the section "Column Separator" of this document.

    Encoding

    Supported CSV file encoding types include: GBK, BIG5, ISO-8859-1, UTF-8, UTF-16, EUC_JP, EUC_KR, GB2312, and CP850.

    Outputting Field Names to First Row

    When this option is selected, the field names are written to the first row of the file; when this option is not selected, the data is written directly to the first row.

    File Split

    File Split applies to scenarios involving large data volume file outputs, such as when the data volume exceeds the maximum number of rows supported by Excel. This function can be used to split the data by row count.

    For details, see the section "File Splitting" of this document.

    Duplicate Handling Strategy

    Files in the same folder cannot have the same name.

    There are three options:

    • Stop Writing and Report An Error

    • Append Data to Existing File: If the specified sheet name already exists in the target file, data is appended to that sheet; otherwise, a new sheet is created for writing data.

    iconNote:
    In versions prior to 4.2.10.3, if you choose to output files to an Excel file, you cannot select Append Data to Existing File for Duplicate Handling Strategy.
    • Overwrite Data in Target File: This option will modify the existing target file. Carefully confirm the file path before using this option.

    Field Mapping

    In versions prior to 4.2.10.3, the target field type displayed during field matching was fixed as string and could not be modified. 

    From version 4.2.10.3 and later, renaming fields and changing field types are supported, as shown in the following figure.

    The default field mapping logic is shown in the table below. Unsupported types are uniformly mapped to string.

    Original TypeOutput Type
    nullEmpty string
    intint
    doubledouble
    floatfloat
    longstring
    decimaldecimal
    BigIntegerBigInteger
    BigDecimalBigDecimal
    booleanboolean
    datedate
    stringstring
    timestamptimestamp
    anystring
    vacharvachar

    The preview effect and the output value of the operator preceding the File Output operator are the same. If users require formatting, they can apply formulas during the upstream computation to format dates and numbers. When dates and numbers are outputted as text, their formatting results will be preserved exactly as specified.

    Exporting Data to an Excel File

    The following figure shows the setting page.

    Excel Single-File Data Capacity

    • Excel 2003 and earlier: Each worksheet supports up to 65,536 rows and 256 columns.

    • Excel 2007 and later: Each worksheet supports up to 1,048,576 rows and 16,384 columns.

    iconNote:
    The current file output format for Excel is xlsx.

    Sheet Name

    Enter the name of the sheet for writing data to. If Sheet Name is left blank, the default sheet name will be used. You can enter parameters for Sheet Name.

    File Split

    File Split applies to scenarios involving large data volume file outputs, such as when the data volume exceeds the maximum number of rows supported by Excel. This function can be used to split the data by row count.

    iconNote:
    Starting from version 4.2.10.3, splitting data into multiple sheets by row count is supported.

    File naming instructions:

    When the number of rows (including the field name row generated if Output Field Names to First Row is selected) reaches the specified limit, a new file will be created. A suffix such as "_1, _2..." will be automatically appended to the file name.

    Sheet naming instructions:

    If a sheet name is specified, "_1", "_2" is automatically appended to the sheet name.

    If no sheet name is specified, default names like "Sheet1", "Sheet2" are used.

    Notes:

    1. If File Splitting is not selected and the number of rows in the file reaches Excel’s upper limit, an error will be reported on the backend.

    2. If Output Field Names to First Row is selected, after file splitting, each split file or sheet will still have the first row set as the output field names.

    3. The current file splitting logic is based on the input side. If the duplicate handling strategy is set to append data to the same sheet, the existing data in the target sheet is not counted toward the split row limit. In this case, the actual data volume in the file may exceed the specified split row count.

    Other Settings

    For details, see the section "Exporting Data to CSV Files" of this document.

    Outputing Data to Custom File Types

    Starting from version 4.2.10.3, outputting data to custom file types, such as XML and JSON, is supported. If the user's data is in XML format, this feature allows the file to be output without any changes.

    The following figure shows the setting page.

    Configuration ItemDescription
    Folder AddressFor details, refer to the section "Folder Address" of this document.
    File Name
    • Enter the file name: Parameters are supported; this option cannot be empty

    • File extensions can be customized. You can enter a custom file type suffix (for example, XML, JSON, or YAML). Only one suffix is allowed, and the input is case-insensitive.

    File Content
    iconNote:
    Starting from version 4.2.11.3, Value Source has been renamed to File Content, and Specify Column/Specify Row has been renamed to Source Column/Source Row.
    • Only single-row, single-column data output by an upstream operator can be specified as the value source.

    • The value of Source Column should be a positive integer, and is 1 by default. Parameters are supported.

    • The value of Source Row  should be a positive integer, and is by default. Parameters are supported.

    EncodingFor details, see the section "Encoding" of this document.
    Duplicate Handling StrategyFor details, see the section "Duplicate Handling Strategy" of this document.

    Special Scenario Handling Strategy

    ScenarioHandling Strategy
    When a file is written into the system, another file with the same name already exists.Handle the conflict according to Duplicate Handling Strategy configured in the node
    NULL/empty string exists in the data written to the CSV file

    NULL: Written as a null value, without text qualifiers, e.g., ("a","b","c")

    Empty string: Written as an empty string enclosed by text qualifiers, e.g.,("a","b","c")

    Line breaks exist in the data written to the CSV file Line breaks are preserved normally (enclosed by text qualifiers)
    Images, icons, or other non-text data exist in the data written to the Excel file.The system attempts to convert the data to a string. If conversion fails, an error is displayed.

    Example

    For basic usage of the File Output operator, see File Output Typical Example.


    附件列表


    主题: Data Development - Scheduled Task
    Previous
    Next
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy