Skip to content

SFTP ​

Uploads each batch as a file on an SFTP server. Use it when a partner still collects files that way.

Before you begin ​

  • Host, username, and a remote directory the user can write.
  • A password or a private key path.
bash
export SFTP_PASSWORD="change-me"

Configure ​

python
from skippr import Config, DataSinkSftp, EnvRef, Pipeline

cfg = Config.discover()
out = cfg.data_sink(
    "partner",
    DataSinkSftp(
        host="sftp.partner.example",
        username="skippr",
        remote_path="/incoming/skipprd",
        port=22,
        password=EnvRef("SFTP_PASSWORD"),
    ),
)
cfg.pipeline("export", Pipeline(data_source=cfg.get_data_source("sample"), data_sink=out))
cfg.save()
bash
skipprd connect data-sink sftp \
  --pipeline export \
  --name partner \
  --host sftp.partner.example \
  --username skippr \
  --remote-path /incoming/skipprd \
  --port 22 \
  --password '${SFTP_PASSWORD}'
yaml
data_sinks:
  partner:
    Sftp:
      host: sftp.partner.example
      username: skippr
      remote_path: /incoming/skipprd
      port: 22
      password: ${SFTP_PASSWORD}

Options ​

KeyTypeRequired/DefaultDescription
hoststringRequiredSFTP host
usernamestringRequiredUser
remote_pathpathRequiredRemote directory
portintegerNot setPort (default 22)
passwordsecretNot setPassword as ${ENV}
private_key_pathpathNot setPrivate key file (instead of a password)
formatstringNot setFile format override

A retry overwrites the same remote path.

How data lands ​

Files are uploaded under remote_path/<namespace>/.

Troubleshooting ​

SymptomFix
Connection refusedCheck host, port, and firewall
Auth failedConfirm password or key, and that the key has no passphrase Skipprd cannot supply
Permission deniedGrant write on remote_path

Next steps ​