◂ Back to examples
/

Turn file feeds into integrations

Pick up files from SFTP and SMB servers on a schedule, hand each one to a Python service, and connect batch feeds to the databases, queues and APIs that need them.

Tutorials

How to use the file transfer integration

More examples

About file transfer

Files are still how a great many organizations exchange data with each other. Banks send settlement files, retailers send stock and price lists, hospitals send interchange files, and payroll, logistics and government systems all trade fixed-width and delimited files on timetables that have been in place for decades. Zato connects to the SFTP and SMB servers those feeds live on, watches the directories they arrive in, and hands each file to a Python service that can validate it, transform it and pass it on to a database, a queue, an API or another file server. The result is that a batch feed becomes an integration like any other, with the same services, the same logging and the same deployment as the rest of your work.

Frequently asked questions

Which protocols does Zato speak?

SFTP and SMB, through outgoing SFTP connections and outgoing SMB connections. Both share one API, so a service written against one works against the other.

How do I pick up files as they arrive?

Add a file transfer schedule to the connection. It looks into a directory as often as you tell it to and invokes your service once per file.

How does Zato know a file has finished uploading?

Either by watching it stop changing, or by waiting for a marker file the sender puts down when it is done. See schedules for both modes.

What does my service receive?

One file transfer item per file, with the name, the full path, the size, the modification time and the contents.

What happens to a file once it has been processed?

It is either moved to a destination directory of your choosing or deleted, as the schedule says. A file your service refuses is left exactly where it was and comes back on the next run.

Can two servers watch the same directory?

Yes - turn claiming on and each file is renamed before anything reads it, so no two servers ever take the same one. See real-world feeds.

Can I upload and download files from my own code?

Yes - the connection API gives your service the whole remote file system, with no schedule involved.

How do I keep this configuration under version control?

With enmasse. Connections and their schedules live in YAML and are imported into any environment.

Ready to connect your file feeds?

Get started with Zato and turn the files your partners send into integrations you can maintain.