Reading From SFTP

I am trying to read some files from an SFTP server, but am running into issues. From the documentation, under “Supported File URL Formats for Readers”:

sftp://username:password@server/path/filename.txt

Reads specified filename.txt file on remote server connected via ftp protocol using username and password.

If certificate-based authentication is used, certificates are placed in ${PROJECT}/ssh-keys/ directory and each private key file name has suffix .key. Only certificates without password are currently supported.

First, are wildcards are permitted, e.g. can I do “sftp://username:password@server/path/*.txt”?

Second, do special characters (asterisks, parens, etc.) in passwords have to be escaped? If so, how?

Thanks!

Dear Benjamin,

  1. Yes, you can use wildcards in SFTP file URL

  2. It is necessary to escape each special character in your username or password by the URL Encoding (also known as Percent-encoding).

For example, @ in your username or password should be encoded to %40. Please note, the asterisk wildcard is not necessary to encode.

For more information about URL Encoding, please see http://en.wikipedia.org/wiki/Percent-encoding

You can also use online URL Encoding tool, for example: http://www.url-encode-decode.com/