Process CSV files from SFTP with batch logic

File TransferData ParserMarketing

What it does

When a new or updated CSV file appears in a directory on the SFTP server, this automation processes it in batches. It composes the CSV conditionally, uploads the result back to SFTP, and renames the file when complete.

Who it's for

Data and analytics teams who need to transform CSV files automatically without opening them manually.

How teams use this

Process multi-batch CSV uploads automatically

Transform a large CSV file across multiple batches without manual intervention. Each batch is composed and uploaded, then the final file is renamed to show completion.

Route transformed files to archive

After transformation, move the processed CSV to an archive folder on the SFTP server so the source directory stays clean and organized for future uploads.

Add validation before upload

Include a condition to check the composed CSV for required columns or data quality before uploading it back to SFTP. Only valid files proceed forward.

How it works

  1. Monitor SFTP directory for new files. Watch a directory on the SFTP server for new or updated CSV files. When one arrives, the automation begins processing it in batches.
  2. Compose CSV based on batch status. Check if this is the first batch using Csv Parser. If yes, compose the CSV with initial formatting. If no, compose it with different logic for subsequent batches.
  3. Upload transformed file to SFTP. Upload the composed CSV file back to the SFTP server so it is ready for the next step or for download by the team.
  4. Rename or move file when complete. When the last batch is processed, rename or move the file in the SFTP server directory to mark it as transformed and complete.