pluck (FTP command)
Overview
The pluck command retrieves a file, loads content into the process flow as a payload, and then deletes the file from the remote server.
Need to know
You can pluck a single file or multiple files.
Regular expressions are supported when defining files to retrieve with the
getcommand.
Connection settings
When configuring an SFTP connector, two fields should be updated:
FTP command only: pluck
The root to the file(s) you want to pluck. Since the root only applies to one directory, you can enter the full path here.
The filename(s) to be plucked.
Example
Scenario

Our process flow is configured as follows:


In this flow, we need to pluck all files in /myfiles/folderB that start with orders - so orders.json, orders2.json, orders3.json:

The steps

Connector settings
Our SFTP shape is configured as follows:

Use the
SFTP GET user passendpoint.Start looking for the file to rename from the
root, which is defined as:/myfiles/folderB/Check the
pathfor the file(s) to pluck, which is defined as:/^orders.*/i. This regular expression resolves to 'all files starting with 'orders', irrespective of upper/lower case.

Payload & SFTP server
When the process flow is run, the payload for the SFTP shape shows the content retrieved from matched files. We have three payloads:

On our remote server, all 'orders' files have been removed from /myfiles/folderB/ and this directory is now empty:

Last updated
Was this helpful?