Connecting via an IDE
Yandex Query supports JDBC
While this tutorial describes connecting via DBeaver, the process is the same for any system that supports JDBC data sources.
DBeaver
DBeaver
JDBC driver
Connecting to Yandex Query from DBeaver requires a JDBC driver. Since Yandex Query is based on YDB federated queries
To download the driver, do the following:
- Navigate to the ydb-jdbc-driver repository
. - Select the latest release tagged
Latestand downloadydb-jdbc-driver-shaded-<driver-version>.jar.
Registering a JDBC driver with DBeaver
To register the JDBC driver, follow these steps:
-
Select Database from the DBeaver top menu and click Driver management:

-
To create a new driver, click New in the Driver Manager window:

-
In the Create driver window that opens, set Driver name to
Yandex Query:
-
Navigate to the Libraries section, click Add file, specify the path to the YDB JDBC driver you downloaded previously, and click OK:

-
The Yandex Query driver will appear in the list. Double-click the driver name, switch to the Libraries tab, click Find Class, and select
tech.ydb.jdbc.YdbDriverfrom the drop-down list.Warning
Make sure you click
tech.ydb.jdbc.YdbDriverin the drop-down list to select it. Otherwise, DBeaver will act as if you have not selected a driver.
Creating a Yandex Query connection
Before creating a connection, complete the following steps:
-
Create a service account named
dbeaverwith theeditorrole. -
Create an authorized key for the service account and save it to a file.
Then follow these steps:
-
In DBeaver, create a new connection with the
Yandex Queryconnection type. -
In the window that opens, navigate to the Main section.
-
Under General, specify the following path in the JDBC URL field:
jdbc:ydb:grpcs://grpc.yandex-query.cloud.yandex.net:2135/<folder_id>?saFile=<path_to_auth_key_file.json>&useQueryService=falseWhere:
folder_id: ID of the folder you will use to run queries against Yandex Query.path_to_auth_key_file.json: Authorized key file path.useQueryService: Connection mode. Note that Yandex Query only supports theuseQueryService=falsemode.

-
Click Test connection ... to make sure your configuration is correct.
If everything is correct, a success message will appear:

-
Click Finish to save the connection.
Working with Yandex Query
In DBeaver, you can see the list of your data bindings and their structure:

Also, you can run queries:
