Search code examples
ftpkdbq-lang

Downloading FTP files in Q (KDB)


Does anybody know if there is any way to download files from ftp server directly from Q (kdb) ? I know that it's possible to use http but didn't see any examples of using ftp. Seems only way is to write wrapper around something like curl etc, but may be it is already done ? Any thoughts ?


Solution

  • use a system call to curl without a file destination -- its default destination is stdout, so the file contents will be returned to q as the return value of system

    data:system"curl ftp://wherever/whatever"