Skip to content

Tenzir supports the File Transfer Protocol (FTP), both downloading and uploading files. Use from_ftp to download bytes and parse them with a subpipeline, and use to_ftp to print events with a subpipeline and upload the result.

FTPServer

FTP consists of two separate TCP connections, one control and one data connection. This can be tricky for some firewalls and may require special attention.

These examples use the direct FTP operators with explicit parsing and printing subpipelines.

Download and parse a file from an FTP server

Section titled “Download and parse a file from an FTP server”

Use from_ftp with read_ndjson to turn the downloaded bytes into events.

from_ftp "ftp://user:pass@ftp.example.org/path/to/file.ndjson" {
read_ndjson
}

Use to_ftp with write_ndjson to serialize events before uploading them.

from {
x: 42,
y: "foo",
}
to_ftp "ftp://user:pass@ftp.example.org/a/b/c/events.ndjson" {
write_ndjson
}

Last updated: