Connect and query with DBeaver
Note
We will retire Azure HDInsight on AKS on January 31, 2025. Before January 31, 2025, you will need to migrate your workloads to Microsoft Fabric or an equivalent Azure product to avoid abrupt termination of your workloads. The remaining clusters on your subscription will be stopped and removed from the host.
Only basic support will be available until the retirement date.
Important
This feature is currently in preview. The Supplemental Terms of Use for Microsoft Azure Previews include more legal terms that apply to Azure features that are in beta, in preview, or otherwise not yet released into general availability. For information about this specific preview, see Azure HDInsight on AKS preview information. For questions or feature suggestions, please submit a request on AskHDInsight with the details and follow us for more updates on Azure HDInsight Community.
It's possible to use JDBC driver with many available database tools. This article demonstrates how to configure one of the most popular tool DBeaver to connect to Trino cluster with HDInsight on AKS in few simple steps.
Prerequisites
Configure DBeaver to use Trino JDBC driver for HDInsight on AKS
Open DBeaver and from the main menu, select Database -> Driver Manager.
Note
DBeaver comes with existing open-source Trino driver, create a copy of it and register as Trino JDBC driver for HDInsight on AKS.
Select Trino driver from list and click Copy.
- Update Driver Name, for example, "Azure Trino" or "Trino for HDInsight on AKS" or any other name.
- Make sure Default Port is 443.
Select Libraries tab.
Delete all libraries currently registered.
Click Add File and select installed Trino JDBC jar file for HDInsight on AKS from your local disk.
Note
Trino CLI for HDInsight on AKS comes with Trino JDBC jar. You can find it in your local disk.
Reference location example:C:\Program Files (x86)\Microsoft SDKs\Azure\TrinoCli-0.410.0\lib
. Location may defer if the installation directory or CLI version is different.Click Find Class and select
io.trino.jdbc.TrinoDriver
.Click OK and close Driver Manager, the driver is configured to use.
Query and browse Trino cluster with DBeaver
Connect to your Trino cluster by clicking New Database Connection in the toolbar.
Select newly registered driver. In this example, "Azure Trino."
Click "Next." On the Main tab update Host with Trino cluster endpoint, which you can find in portal on cluster overview page.
Optionally, select Driver properties tab and set
azureUseTokenCache=true
. This parameter would reduce number of authentication actions user needs to perform if interactive browser authentication is required. DBeaver initializes several connections for different tool windows in UI, each requiring authentication, and possibly user action.Click OK, connection is ready. You can click Test Connection or close the window.
Expand connection in Database Navigator on the left to browse catalogs. Browser may open with authentication prompt.
In main menu, click SQL Editor -> New SQL Script and type any Trino query to get started.