append (FTP command)
Overview
The append command takes the incoming payload (either from another file on your remote server or some other source) and appends this content to a specified file on the remote server.
Connection settings
When configuring an SFTP connector, three fields should be updated:
FTP command only: append
The root to the directory where the source file is located. You could enter just / and then a full path in the path field, or you can provide the full path as the root.
The source file (i.e. the file which contains content you want to append to the target file).
Example
Scenario

Our process flow is configured as follows:


In this flow, we have three SFTP shapes, each with a different task:
SFTP shape 1
Retrieve the a list of fruit from a summer.txt file from /myfiles/folderA
SFTP shape 2
Append this content this to another list of fruit in a file named winter.txt, which is also stored in /myfiles/folderA:

SFTP shape 3
Get the full list of fruit from winter.txt and load it into the flow.
The steps

Connector settings for SFTP shape 1
Our first SFTP shape is configured to retrieve content to append, from /myfiles/folderA/summer.txt . Connector settings are defined using a get command, as follows:


Payload from SFTP shape 1
When the process flow is run, the payload for our first SFTP shape shows the content in /myfiles/folderA/summer.txt :


Connector settings for SFTP shape 2
Our second SFTP shape is configured to append the current payload to our target file on the remote server - /myfiles/folderA/winter.txt . Connector settings are defined as follows:


Payload from SFTP shape 2
When the process flow is run, the payload for our second SFTP shape shows just a 1:

A 1 indicates a successful response from your remote server. A 0 indicates an unsuccessful response from your remote server.

Connector settings for SFTP shape 3
Our final SFTP shape is configured to retrieve our target file from the remote server - /myfiles/folderA/winter.txt . Connector settings are defined using a get command, as follows:


Payload from SFTP shape 3
When the process flow is run, the payload for our final SFTP shape shows the content in /myfiles/folderA/winter.txt :

Here we can see that content from /myfiles/folderA/summer.txt has ben appended to original content in /myfiles/folderA/winter.txt.
Last updated
Was this helpful?