Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Query
    • Data formats and compression algorithms
    • Working with Managed Service for ClickHouse® databases
    • Working with Managed Service for Greenplum® databases
    • Working with Managed Service for MySQL® databases
    • Working with Managed Service for PostgreSQL databases
    • Working with Managed Service for YDB databases
    • Writing metrics to Yandex Monitoring
  • Access management
  • Pricing policy
  • Integration
  • Audit Trails events
  • FAQ

In this article:

  • Setting up a connection
  • Query syntax
  • Limitations
  • Filter pushdown
  • Supported data types
  • Primitive data types
  • Optional data types
  1. Data sources and targets
  2. Working with Managed Service for YDB databases

Working with Managed Service for YDB databases

Written by
Yandex Cloud
Updated at March 6, 2025
  • Setting up a connection
  • Query syntax
  • Limitations
  • Filter pushdown
  • Supported data types
    • Primitive data types
    • Optional data types

This section provides the basic information about working with Managed Service for YDB.

To work with a Managed Service for YDB database from Yandex Query, follow these steps:

  1. Create a connection containing your database connection credentials.
  2. Run a query to the database.

Example of a query for reading data from Managed Service for YDB:

SELECT * FROM ydb_connection.my_table

Where:

  • ydb_connection: Name of the DB connection you created.
  • my_table: Name of the table in the database.

Setting up a connectionSetting up a connection

To create a connection to Managed Service for YDB:

  1. In the management console, select the folder where you want to create a connection.

  2. In the list of services, select Yandex Query.

  3. In the left-hand panel, go to the Connections tab.

  4. Click Create new.

  5. Specify the connection parameters:

    1. Under General parameters:

      • Name: Name of the connection to Managed Service for YDB.
      • Type: Managed Service for YDB.
    2. Under Connection type parameters:

      • Cluster: Select an existing Managed Service for YDB database or create a new one.

      • Service account: Select the Managed Service for YDB service account to use for connecting to Managed Service for YDB clusters and database authentication. If you do not have a service account, create one and assign the ydb.viewer role to it.

        To use a service account, the iam.serviceAccounts.user role is required.

  6. Click Create.

Query syntaxQuery syntax

Here is the SQL query format used to access Managed Service for YDB:

SELECT * FROM <connection>.<table_name>

Where:

  • <connection>: Name of the DB connection you created.
  • <table_name>: Name of the table in the database.

LimitationsLimitations

External sources are only available for data reading through SELECT requests. Yandex Query does not currently support requests that modify tables in external sources.

Filter pushdownFilter pushdown

Yandex Query can transfer processing of request parts to the data source system. This means that filter expressions are provided through Yandex Query directly to the database for processing; these are typically the query conditions specified in WHERE. This kind of processing is called filter pushdown.

Filter pushdown is possible when using:

Description Example
Filters like IS NULL/IS NOT NULL WHERE column1 IS NULL or WHERE column1 IS NOT NULL
Logical conditions OR, NOT, or AND WHERE column IS NULL OR column2 is NOT NULL
Conditions =, <>, <, <=, >, >= for comparison with other columns or constants WHERE column3 > column4 OR column5 <= 10

Supported data types for filter pushdown:

Data type Yandex Query
Bool
Int8
Uint8
Int16
Uint16
Int32
Uint32
Int64
Uint64
Float
Double
String
Utf8

Supported data typesSupported data types

The tables below show how Managed Service for YDB and Yandex Query data types map. Data types not listed in the tables are not supported.

Primitive data typesPrimitive data types

Data type Managed Service for YDB Data type Yandex Query
Bool Bool
Int8 Int8
Uint8 Uint8
Int16 Int16
Uint16 Uint16
Int32 Int32
Uint32 Uint32
Int64 Int64
Uint64 Uint64
Float Float
Double Double
Date Date
Datetime Datetime
Timestamp Timestamp
String String
Utf8 Utf8
Json Json
JsonDocument Json

Optional data typesOptional data types

Data type Managed Service for YDB Data type Yandex Query
Optional<Bool> Optional<Bool>
Optional<Int8> Optional<Int8>
Optional<Uint8> Optional<Uint8>
Optional<Int16> Optional<Int16>
Optional<Uint16> Optional<Uint16>
Optional<Int32> Optional<Int32>
Optional<Uint32> Optional<Uint32>
Optional<Int64> Optional<Int64>
Optional<Uint64> Optional<Uint64>
Optional<Float> Optional<Float>
Optional<Double> Optional<Double>
Optional<Date> Optional<Date>
Optional<Datetime> Optional<Datetime>
Optional<Timestamp> Optional<Timestamp>
Optional<String> Optional<String>
Optional<Utf8> Optional<Utf8>
Optional<Json> Optional<Json>
Optional<JsonDocument> Optional<Json>

Was the article helpful?

Previous
Working with Managed Service for PostgreSQL databases
Next
Writing metrics to Yandex Monitoring
Yandex project
© 2025 Yandex.Cloud LLC