DBeaver is a universal SQL client and a database administration tool. It is a free tool, and you can download it from the DBeaver website.
This section describes how to connect DBeaver to Exasol and run an SQL statement.
The following environment is used as an example in the document:
- Community edition of DBeaver
- Windows Operating System
- Exasol database installed and running.
- DBeaver downloaded and installed.
- Launch DBeaver. If you are running DBeaver for the first time, the Connect to database dialog is displayed, select Exasol, and click Next.
In the Connect to database screen enter the following connection details:
- Host list
- User name and password
Click Test Connection to test if the connection to the Exasol database works.
- When you click Test Connection, DBeaver also performs a check on the available JDBC driver for Exasol, and prompts you to download the driver. The Driver settings dialog is displayed where you can download the latest driver.
Click Download to download the JDBC driver for Exasol.
- Next, you can verify the JDBC drive details by clicking Edit Driver Settings in the Connect to database screen, and click OK to continue.
- Perform the test connection again to make sure the connection to the database works. Click Test Connection, a confirmation message is displayed on a successful connection. Click OK to continue.
- Exasol database is now listed in the Database Navigator section in DBeaver, as shown below:
- Before you continue to execute SQL statements, ensure the option for enhanced metadata usage is checked. On DBeaver, navigate to Window -> Preferences -> Metadata and make sure the check-box next to Open separate connection for metadata read is selected, as shown in the below screenshot. If this option is not selected, then select the check-box and click Apply and Close to save the changes.
- Next, select SQL Editor -> SQL Editor or press F3 open an SQL editor.
- Enter an SQL statement in the SQL editor and execute it. The result of the query is shown in the Result tab.
Else, to add a new database connection. Navigate to Database -> New Database Connection, select Exasol, and click Next.
R scripts on DBeaver are not executed
The issue occurs because DBeaver uses the platforms linefeed convention CRLF. R scripts need to be complied with LF as the linefeed. The workaround is to change the line delimiters to LF. You can set the linefeed to LF as follows:
- Open DBeaver and go to File -> Convert Line Delimiters to -> LF.
Problem: If a script contains multiple semicolons or newlines, DBeaver has problem with identifying where a script ends.
Solution: The simplest way to get around that problem is to highlight the whole script and execute it as a single step.
After connecting DBeaver to Exasol, you can start loading data into the Exasol database. For more information, see Loading Data.
For more information about DBeaver, see DBeaver Official Documentation.