If you require to send multiple files from your local machine to an SFTP Server as a destination, please follow the below instructions:
Illustrated in the below images is an example of how your flow will look. A File System List is used as a source step. A sub-flow is then added to distinguish the file names by using the Relay Based File System source step and the file names are coming from the path that is in the File System List source step. The destination is the SFTP Multiple Files step for the SFTP Server to receive multiple files.
- In the File System List source step, you can select the relay from the drop down list or you can create a new relay by clicking on the highlighted icon in the image below. Type in the Path where the files are stored in your local machine and save the step.
The below link assists on how to create a relay:
Illustrated below is an example of the endpoint config in the Relay Manager.
- In the Relay Based File System source step, “
parentRecord.path” is amended in the Path field by clicking on the highlighted in the below images. This will reference the path in the in the File System List source step and separate the files.
- A Calculator step is added outside of the sub-flow for testing purposes. When you test on the Calculator step, the path, file name and base path will be returned for each file as illustrated below.
- The Combine step is then added to aggregate the entire dataset into one data set since Synatic processes one record at a time. The SFTP Multiple Files destination step is then added to send the files to the inputted path.
If you require to view the data that is in the files, you will need to do the following:
- In the sub-flow, copy the Relay Based File System source step and then delete it . Then delete the Pass Through step. Add a reader step to read the data from the files and then add the copied Relay Based File System source step as shown in the below image.
- Change the expected results of the sub- flow by clicking on the highlighted icon in the below image.
- Select “Array” as the Type, “Record” as the Source and input a created field name in the Add To Record As field to view the file’s data in that field and the click on Save as shown in the below page.
- When testing on the Calculator step, you will see the file’s data under the FileData field (when expanded) in the returned results as illustrated in the below images.