Skip to main content

DBeaver

You can run SQL from DBeaver to explore your data in your data lakes and relational databases through Dremio.

Supported Versions

You can use any version of DBeaver for Linux, MacOS, or Windows, except for version 23.0.2.202304091457.

Supported Authentication Method

Authenticate to Dremio Cloud by using a personal access token. To create one, see Creating a Token.

Prerequisites

  • Download the JDBC driver for Arrow Flight SQL.

    note

    If you want to use DBeaver with the legacy Dremio JDBC driver, see the instructions here.

  • URL-encode your personal access token. To encode it locally on your system, you can follow these steps:

    1. In a browser window, right-click an empty area of the page and select Inspect.
    2. Click Console.
    3. Type encodeURIComponent("<PAT>"), where <PAT> is the personal access token that you obtained from Dremio Cloud. The URL-encoded PAT appears in red on the next line. You can highlight it and copy it to your clipboard.
  • Install the Dremio Cloud certificate in your system trust store.

    1. At a command-line prompt, enter this command:

      Command to display the Dremio Cloud certificates
      openssl s_client -showcerts -connect data.dremio.cloud:443 </dev/null
    2. Copy the last certificate, including the lines -----BEGIN CERTIFICATE----- and -----END CERTIFICATE-----.

    3. Paste the content of your clipboard into a new text-based file named cert.pem.


    Then, follow one of these steps:

    • If you are using DBeaver on Linux: Install the certificate according to the instructions for your operating system.

    • If you are using DBeaver on MacOS:

      a. In Finder, double-click this new file.

      b. Select System as the trust-store type.

    • If you are using DBeaver on Windows:

      a. At a command-line prompt, enter one of these commands:

      • certlm if you want to add the certificate for all user accounts on your Windows system.

      • certmgr if you want to add the certificate only for the current user account.

        b. Right-click the folder Trusted Root Certification Authorities.

        c. Select Import.

        d. Browse for the cert.pem file and import it.

Connecting to Dremio

  1. In DBeaver, add the JDBC driver for Arrow Flight SQL as a new driver. You need to do this only once, and can skip this step if DBeaver already lists this driver in its Driver Manager dialog:

    a. In the menubar, select Database > Driver Manager.

    b. In the Driver Manager dialog, click New.

    c. In the Settings section, follow these steps:

    1. In the Name field, specify a name for the driver, such as "JDBC Driver for Arrow Flight SQL".

    2. In the Driver Type field, ensure that Generic is the selected driver type.

    3. In the Class Name field, specify org.apache.arrow.driver.jdbc.ArrowFlightJdbcDriver.

    4. In the URL Template field, specify jdbc:arrow-flight-sql://data.dremio.cloud:443/?useEncryption=true.

    5. In the Default Port field, specify 443.

    d. In the Libraries section, click Add File and select the .jar file for the JDBC driver for Arrow Flight SQL.

    e. Click OK.

  2. Create a connection to Dremio that uses the driver:

    a. Select Database > New Connection from JDBC URL.

    b. In the Create New Connection from JDBC URL dialog, type jdbc:arrow-flight-sql://host. At this point, DBeaver lists the driver in the Drivers field.

    c. Select the driver and click Next.

    d. In the Connect to a Database dialog, follow these steps:

    1. Select URL as the value for Connect By.

    2. In the JDBC URL field, append this string to the URL: &token=<URL-encoded PAT>

    3. In the URL, replace <URL-encoded PAT> with your URL-encoded personal access token.

    4. (Optional) Click Test Connection. If the connection works, the Connection Test dialog opens and indicates that DBeaver is able to connect to Dremio. The connection is not held open. Click OK.

    5. Click Finish.