Ready to get started?

Download a free trial of the SFTP Driver to get started:

 Download Now

Learn more:

SFTP Icon SFTP JDBC Driver

An easy-to-use database-like interface for Java based applications and reporting tools access to remote files and directories.

Connect to SFTP Data in RazorSQL



Connect to SFTP from wizards and query SFTP data from the GUI in the RazorSQL database management tool.

The CData JDBC Driver for SFTP enables standards-based access from third-party tools, from wizards in IDEs to data management and analysis tools. This article shows how to connect to SFTP using wizards in RazorSQL.

Create a JDBC Data Source for SFTP Data

  1. Open the RazorSQL application and, in the Connections menu, select Add Connection Profile -> Other -> JDBC.
  2. In the Connection Wizard that appears, set the following properties:
    • Driver Location: Set this property to the path to the lib subfolder in the installation directory.
    • Driver Class: Set the driver class to cdata.jdbc.sftp.SFTPDriver.
    • Username: Enter the username. (This property can also be set in the JDBC URL.)
    • Password: Enter the password. (This property can also be set in the JDBC URL.)
    • JDBC URL: Enter connection parameters. The JDBC URL begins with jdbc:sftp: and is followed by a semicolon-separated list of connection properties.

      SFTP can be used to transfer files to and from SFTP servers using the SFTP Protocol. To connect, specify the RemoteHost;. service uses the User and Password and public key authentication (SSHClientCert). Choose an SSHAuthMode and specify connection values based on your selection.

      Set the following connection properties to control the relational view of the file system:

      • RemotePath: Set this to the current working directory.
      • TableDepth: Set this to control the depth of subfolders to report as views.
      • FileRetrievalDepth: Set this to retrieve files recursively and list them in the Root table.
      Stored Procedures are available to download files, upload files, and send protocol commands. See gdatamodel for more on using SQL to interact with the server.

      Built-in Connection String Designer

      For assistance in constructing the JDBC URL, use the connection string designer built into the SFTP JDBC Driver. Either double-click the JAR file or execute the jar file from the command-line.

      java -jar cdata.jdbc.sftp.jar

      Fill in the connection properties and copy the connection string to the clipboard.

      A typical JDBC URL is the following:

      jdbc:sftp:RemoteHost=MyFTPServer;

Query SFTP Data and Select Tables

After establishing a connection, the wizard will close and the connection will be available in the connections panel. You can then query the tables.