In Chain Builder, you can use templates as a starting point for new chains. To build a chain to download files from a Secure File Transfer Protocol (SFTP) server, start with the Download file from SFTP server template. For example, with this template, you can quickly create chains to extract data from an SFTP server to use as table datasets in Wdata.
Prerequisites
To use the Download file from SFTP server template, first set up:
To enable customization, the template contains a CV SFTP file path variable for the path of the SFTP directory to download from. Determine the path for this variable—such as /path/to/data/*.csv
—for when you run a chain created from the template.
Note: We recommend you also create a chain to upload the extracted data to a destination system, which you can use with a Run chain event.
Step 1. Create a chain from the template
- In Chain Builder, create a chain from the Download file from SFTP server template from either Build or Templates.
Note: If this is your first chain in the workspace, create it from Templates.
- From Build, Chains, click Add, Create chain from template, and then select the Download file from SFTP server template and click Create from template.
- From Templates, select Workiva chains, open the Download file from SFTP server template under SFTP, and click New chain.
- From Build, Chains, click Add, Create chain from template, and then select the Download file from SFTP server template and click Create from template.
- Enter a unique name to help identify the chain.
- Select the workspace and environment to use the chain, and click Next.
- Set up the CV SFTP file path variable, and click Next:
- In Variable type, select Chain.
- In New variable name, enter
CV SFTP file path
.
- Select the connector and runner to use with each connection, and click Submit.
- Click View your new chain.
Step 2. Set up the new chain
- From the new chain, click Chain Settings.
- For the CV SFTP file path variable, enter the path to the SFTP directory, and click Save.
- To test to the connection to the SFTP directory, click Publish, Execute, and Run chain, and verify the List File Contents command creates an output.
- Add any additional commands to the chain, such as to upload the extracted data to another system. For example, to use the data as a table dataset, add a Run chain event to use with a chain created from the Update datasets in a table template.
- Click Publish.