Awesome
How to set up DBeaver Community Edition (on MacOS) to use the Apache Arrow Flight SQL JDBC Driver
<img src="https://img.shields.io/badge/dockerhub-flight--sql%20image-green.svg?logo=Docker"> <img src="https://img.shields.io/badge/GitHub-voltrondata%2Fflight--sql--server--example-blue.svg?logo=Github"> <img src="https://img.shields.io/badge/Arrow%20JDBC%20Driver-download%20artifact-red?logo=Apache%20Maven">
Here are the steps:
-
Make sure you have access to a running Flight SQL server - you can use this repo to easily start one if you do not have one running.
-
Download DBeaver Community Edition if you haven't already - here
-
Download the Apache Arrow Flight SQL JDBC driver - here - choose the "jar" option.
-
Launch DBeaver
-
In the DBeaver application menu bar, open the "Database" menu and choose: "Driver Manager":
-
Click the "New" button on the right:
-
Add the JDBC jar file:
- Click the "Libraries" tab
- Click the: "Add File" button
- Choose the "flight-sql-jdbc-driver-11.0.0.jar" jar file (the file downloaded in step 3 above) - and click "Open"
- Close the Driver editor window with the blue "OK" button on the lower-right
-
Enter the driver settings:
-
Click the "Settings" tab
-
In the "Driver Name" field - enter:
Apache Arrow Flight SQL
-
In the "URL Template" field - enter:
jdbc:arrow-flight-sql://{host}:{port}?useEncryption=true&disableCertificateVerification=true
-
In the "Driver Type" drop-down box - choose: "SQLite"
-
Your driver manager "Edit Driver" window should look like this:
-
Click the blue "OK" button on the lower-right to save the driver
-
Close the "Driver Manager" window by clicking the blue "Close" button on the lower-right.
-
-
Create a new Database Connection:
- In the DBeaver application menu bar, open the "Database" menu and choose: "New Database Connection":
- In the "Connect to a database" window - type:
Flight
in the search bar - Choose the
Apache Arrow Flight SQL
driver - your window should look like this:
- Click the blue "Next >" button on the bottom of the window
- On the next screen, the JDBC URL should be filled out already - just supply the Host (
localhost
), Port (31337
), Username (flight_username
), and Password values for your running Flight SQL server. Your window should look like this:
- Click the "Test Connection" button - your window should look like this:
- Click the blue "OK" button to close the Connection test window
- Click the "Connection details (name, type, ...)" button on the right
- In the "General" section, enter:
Apache Arrow Flight SQL
for the "Connection name". It should look like this: - Click the blue "Finish" button to save the connection
- In the DBeaver application menu bar, open the "Database" menu and choose: "New Database Connection":
-
Run a query:
- Right-click on the Database Connection on the left - choose: "SQL Editor", and then: "Open SQL Console" as shown here:
- In the Console window - run a query - something like:
SELECT * FROM customer;
- Click the triangle button to execute the SQL statement - as shown below (or use keyboard shortcut: Ctrl+Enter):
- You should see the query results as shown in this screenshot:
- Right-click on the Database Connection on the left - choose: "SQL Editor", and then: "Open SQL Console" as shown here: