Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
    • Cloud Interconnect
    • Cloud Backup
    • Cloud Registry
    • Yandex AI Studio
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Video
    • Stackland
    • Yandex Cloud Router
    • Yandex Managed Service for Trino
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Yandex StoreDoc
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Managed Service for Sharded PostgreSQL
    • Managed Service for YTsaurus
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • SpeechKit
    • DataSphere
    • Vision OCR
    • Translate
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • Cloud Desktop
    • Yandex SIEM
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • Serverless Integrations
    • IoT Core
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Yandex Query
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Query
    • Data formats and compression algorithms
    • Working with Managed Service for ClickHouse® databases
    • Working with Yandex MPP Analytics for PostgreSQL databases
    • Working with Managed Service for MySQL® databases
    • Working with Managed Service for PostgreSQL databases
    • Working with Managed Service for YDB databases
    • Reading Iceberg tables
  • Access management
  • Pricing policy
  • Integrations
  • Audit Trails events
  • FAQ

In this article:

  • Setting up a connection
  • Query syntax
  • Limits
  • Filter pushdown
  • Supported data types
  • Primitive data types
  • Optional data types
  1. Data sources and sinks
  2. Working with Managed Service for ClickHouse® databases

Working with Managed Service for ClickHouse® databases

Written by
Yandex Cloud
Updated at August 17, 2026
View in Markdown
  • Setting up a connection
  • Query syntax
  • Limits
  • Filter pushdown
  • Supported data types
    • Primitive data types
    • Optional data types

This section covers the basics of working with Managed Service for ClickHouse®.

To start working with a Managed Service for ClickHouse® database, follow these steps:

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

Query example for reading data from Managed Service for ClickHouse®:

SELECT * FROM clickhouse_mdb_connection.my_table

Where:

  • clickhouse_mdb_connection: Your database connection name.
  • my_table: Database table name.

Setting up a connectionSetting up a connection

To create a connection to Managed Service for ClickHouse®:

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

  2. Navigate to Yandex Query.

  3. In the left-hand panel, select Connections.

  4. Click Create new.

  5. Specify the connection settings:

    1. Under General parameters:

      • Name: Managed Service for ClickHouse® connection name.
      • Type: Managed Service for ClickHouse.
    2. Under Connection type parameters:

      • Cluster: Select an existing Managed Service for ClickHouse® cluster or create a new one.

      • Service account: Select an existing Managed Service for ClickHouse® service account or create a new one. Assign it the managed-clickhouse.viewer role allowing it to connect to Managed Service for ClickHouse® clusters.

        To use the service account on your behalf, you need the iam.serviceAccounts.user role.

      • Database: Select the database you will use to work with the ClickHouse® cluster.

      • Login: Username you will use to connect to ClickHouse® databases.

      • Password: Password you will use to connect to ClickHouse® databases.

  6. Click Create.

You need a service account to detect Managed Service for ClickHouse® cluster connection endpoints inside Yandex Cloud. To work with data, set a username and password separately.

Warning

Allow network access from Yandex Query to Managed Service for ClickHouse® clusters. Do it by enabling Yandex Query access in the target database settings.

Query syntaxQuery syntax

ClickHouse® uses the following SQL syntax:

SELECT * FROM <connection>.<table_name>

Where:

  • <connection>: Your database connection name.
  • <table_name>: Database table name.

LimitsLimits

ClickHouse® clusters are subject to the following restrictions:

  1. External sources are available for read-only access via SELECT queries. Yandex Query does not currently support data-modifying queries against external sources.

  2. YQ uses the Yandex Managed Service for YDB type system. The available value ranges of YDB date and time types (Date, Datetime, Timestamp) do not allow storing all values of relevant ClickHouse® types (Date, Date32, DateTime, DateTime64).

    Therefore, YQ returns the date and time values read from ClickHouse® as strings in ISO-8601 format. Regular columns use type Utf8; nullable columns use Optional<Utf8>.

Filter pushdownFilter pushdown

Yandex Query can push parts of query processing down to the source data system by sending filter expressions, e.g., WHERE conditions, directly to the database. This approach is known as filter pushdown.

Filter pushdown is possible when using:

Description Example
NULL check WHERE column1 IS NULL or WHERE column1 IS NOT NULL
Logical operators AND, OR, NOT, and parentheses to control operator precedence WHERE column1 IS NULL OR (column2 IS NOT NULL AND column3 > 10).
Comparison operators =, ==, !=, <>, >, <, >=, and <= that compare a column with other columns or constants WHERE column1 > column2 OR column3 <= 10, WHERE column1 + column2 > 10, WHERE column1 = (10 + 10)

Other filter types do not support source pushdown: the external table rows are filtered on the federated Yandex Query side, i.e., Yandex Query will perform a full scan of the external table when processing the query.

Supported data types for filter pushdown:

Yandex Query data type

Bool

Int8

Uint8

Int16

Uint16

Int32

Uint32

Int64

Uint64

Float

Double

String

Supported data typesSupported data types

By default, ClickHouse® columns cannot contain NULL. However, you can create a table with columns of optional (nullable) types. The column types displayed by Yandex Query when extracting data from an external ClickHouse® source depend on whether the ClickHouse® table uses primitive or optional types.

The tables below show type mapping between ClickHouse® and Yandex Query. Only the listed types are supported.

Primitive data typesPrimitive data types

ClickHouse® data type

Yandex Query data type

Notes

Bool

Bool

Int8

Int8

UInt8

Uint8

Int16

Int16

UInt16

Uint16

Int32

Int32

UInt32

Uint32

Int64

Int64

UInt64

Uint64

Float32

Float

Float64

Double

Date

Utf8

Date32

Utf8

DateTime

Utf8

DateTime64

Utf8

String

String

FixedString

String

Null FixedString bytes are transferred to String unchanged.

Optional data typesOptional data types

ClickHouse® data type

Yandex Query data type

Notes

Nullable(Bool)

Optional<Bool>

Nullable(Int8)

Optional<Int8>

Nullable(UInt8)

Optional<Uint8>

Nullable(Int16)

Optional<Int16>

Nullable(UInt16)

Optional<Uint16>

Nullable(Int32)

Optional<Int32>

Nullable(UInt32)

Optional<Uint32>

Nullable(Int64)

Optional<Int64>

Nullable(UInt64)

Optional<Uint64>

Nullable(Float32)

Optional<Float>

Nullable(Float64)

Optional<Double>

Nullable(Date)

Optional<Utf8>

Nullable(Date32)

Optional<Utf8>

Nullable(DateTime)

Optional<Utf8>

Nullable(DateTime64)

Optional<Utf8>

Nullable(String)

Optional<String>

Nullable(FixedString)

Optional<String>

Null FixedString bytes are transferred to String unchanged.

ClickHouse® is a registered trademark of ClickHouse, Inc.

Was the article helpful?

Previous
Writing data
Next
Working with Yandex MPP Analytics for PostgreSQL databases
© 2026 Direct Cursus Technology L.L.C.