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.
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.
The File Output operator outputs the processed data to structured files in specified destinations and paths, as shown in the following figure.
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.
The following figure shows the setting page.
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.
Data can be exported as CSV or Excel files.
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.
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.
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:
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
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.
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.
Supported CSV file encoding types include: GBK, BIG5, ISO-8859-1, UTF-8, UTF-16, EUC_JP, EUC_KR, GB2312, and CP850.
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.
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.
Overwrite Data in Target File: This option will modify the existing target file. Carefully confirm the file path before using this option.
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.
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.
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.
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 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.
For details, see the section "Exporting Data to CSV Files" of this document.
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.
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.
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 1 by default. Parameters are supported.
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")
For basic usage of the File Output operator, see File Output Typical Example.
滑鼠選中內容,快速回饋問題
滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。
不再提示
10s後關閉
Submitted successfully
Network busy