IMPORTANT: This documentation has been discontinued. Read the updated Append File documentation on our new documentation portal.
Append File adds one or more text files to an existing text file.
Take a look at the configuration parameters of the component:
File Name: name of the file that receives the content from other files.
Charset: charset of the final file.
Files to Append: list of the files to be added to the original file.
File Name: name of the file.
Charset: charset of the file.
Custom Append Files Specification: if the option is enabled, it’s possible to inform the files list to the component in a dynamic way.
Fail On Error: if the option is enabled, the execution of the pipeline with error will be interrupted; otherwise, the pipeline execution proceeds, but the result will show a false value for the “success” property.
Messages flow
Input
Only the files to be used in this component must be in the current pipeline directory.
Output
{
"fileName": "pipeline-example",
"success": true
}
fileName: name of the final file
success: when the call is successful
Append File in Action
See below how the component behaves in a determined situation and what its respective configuration is.
Appending multiple files
File Name: final_file_final.txt
Charset: "UTF-8"
Custom Append Files Specification: enabled
Files to Append:
[
{"fileName": "file1.txt", "charset": "UTF-8"},
{"fileName": "file2.txt", "charset": "UTF-8"}
]
Fail On Error: false
File content: final_file.txt
HEADER
line1
File content: file1.txt
file1
test
File content: file2.txt
file2
another test
Output
{
"fileName": "final_file.txt",
"success": true
}
Final file content: final_file.txt
HEADER
line1file1
testfile2
another test