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
    • Yandex SIEM
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • IoT Core
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • 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.
Tutorials
    • All tutorials
      • Adding data to a ClickHouse® DB
      • Fetching data from Managed Service for Apache Kafka® to Managed Service for ClickHouse®
      • Fetching data from Managed Service for Apache Kafka® to ksqlDB
      • Fetching data from RabbitMQ to Managed Service for ClickHouse®
      • Migrating data to Managed Service for ClickHouse® using ClickHouse®
      • Migrating data to Managed Service for ClickHouse® using Data Transfer
      • Migrating databases from Google BigQuery to Managed Service for ClickHouse®
      • Migrating data from Managed Service for OpenSearch to Managed Service for ClickHouse® with a storage change using Data Transfer
      • Delivering data from Managed Service for MySQL® to Managed Service for ClickHouse® using Data Transfer
      • Exchanging data between Managed Service for ClickHouse® and Yandex Data Processing
      • Configuring Managed Service for ClickHouse® for Graphite
      • Saving a data stream from Data Streams to Managed Service for ClickHouse®
      • Asynchronously replicating data from PostgreSQL to ClickHouse®
      • Asynchronous replication of data from Yandex Metrica to ClickHouse® using Data Transfer
      • Using hybrid storage in Managed Service for ClickHouse®
      • Sharding Managed Service for ClickHouse® tables
      • Executing analytical queries in Managed Service for PostgreSQL with processing in Managed Service for ClickHouse®
      • Loading data from Yandex Direct to a Managed Service for ClickHouse® data mart using Cloud Functions, Object Storage, and Data Transfer
      • Loading data from Object Storage to Managed Service for ClickHouse® using Data Transfer
      • Loading data from Managed Service for YDB to Managed Service for ClickHouse® using Data Transfer
      • Yandex Managed Service for ClickHouse® integration with Microsoft SQL Server via ClickHouse® JDBC Bridge
      • Yandex Managed Service for ClickHouse® integration with Oracle via ClickHouse® JDBC Bridge

In this article:

  • Required paid resources
  • Getting started
  • Prepare and activate a transfer
  • Test the transfer
  • Delete the resources you created
  1. Building a data platform
  2. ClickHouse®
  3. Asynchronous replication of data from Yandex Metrica to ClickHouse® using Data Transfer

Asynchronously replicating data from Yandex Metrica to ClickHouse® using Yandex Data Transfer

Written by
Yandex Cloud
Updated at October 27, 2026
View in Markdown
  • Required paid resources
  • Getting started
  • Prepare and activate a transfer
  • Test the transfer
  • Delete the resources you created

Note

You can transfer data from a Yandex Metrica source if the Metrica Pro package is enabled or when using Data Streaming from Yandex Metrica.

Data Transfer enables you to transfer metrics from Yandex Metrica to a ClickHouse® cluster. This approach guarantees the completeness of the data transferred from Yandex Metrica and allows:

  • Processing data with ClickHouse® tools.
  • Streaming data from ClickHouse® to other locations.
  • Visualizing data with Yandex DataLens or other services.

To transfer data:

  1. Prepare and activate your transfer.
  2. Test the transfer.

If you no longer need the resources you created, delete them.

Required paid resourcesRequired paid resources

  • Managed Service for ClickHouse® cluster: use of computing resources allocated to hosts, as well as the storage and backup size (see Managed Service for ClickHouse® pricing).
  • Public IP addresses if public access is enabled for cluster hosts (see Yandex Virtual Private Cloud pricing).
  • Metrica Pro.

Getting startedGetting started

Set up the infrastructure:

  1. Select an existing metric in Yandex Metrica or create and install a new one.

  2. Create a target Managed Service for ClickHouse® cluster with your preferred configuration.

Prepare and activate a transferPrepare and activate a transfer

  1. Create an endpoint for the Metrica source.

    Hits and sessions are transferred as separate tables.

  2. Create a target endpoint:

    • Database type: ClickHouse.

    • Endpoint parameters → Connection type: Managed cluster.

      Select your target cluster from the list and specify its connection settings.

  3. Create a transfer of the Replication-type that will use the endpoints you created.

  4. Activate the transfer.

Transfers process only the latest data, leaving historical data untouched. If you deactivate and then reactivate the transfer:

  1. Data collected by the Yandex Metrica tracking tag while the transfer was deactivated will not be migrated.

  2. Depending on the cleanup policy selected in the target endpoint, existing data tables will be:

    • Drop: Deleted along with all data and recreated with the same names.
    • Truncate: Truncated while preserving their schemas.
    • Don't cleanup: Left intact for future data writing.

Test the transferTest the transfer

  1. Wait for the transfer status to change to Replicating.

  2. Make sure the metric data from Yandex Metrica has been transferred to the Managed Service for ClickHouse® database:

    1. Connect to the cluster using clickhouse-client.

    2. Verify that the hit and session tables have appeared in the database:

      SELECT table FROM system.tables
      WHERE database = '<ClickHouse®_database_name>'
      

      Result:

      ┌─table───────────────────────┐
      │ hits_dt...                  │
      │ visits_dt...                │
      └─────────────────────────────┘
      
    3. Check whether the hit and session tables contain the relevant metric data:

      SELECT * FROM <name_of_hit_or_visit_table>
      

Delete the resources you createdDelete the resources you created

Note

Before deleting the created resources, deactivate the transfer.

To reduce resource usage, delete the resources you no longer need:

  1. Delete the transfer.
  2. Delete the source and target endpoints.
  3. Delete the Managed Service for ClickHouse® cluster.
  4. Delete the Yandex Metrica tracking counter from your Yandex Metrica Pro account.

ClickHouse® is a registered trademark of ClickHouse, Inc.

Was the article helpful?

Previous
Asynchronously replicating data from PostgreSQL to ClickHouse®
Next
Using hybrid storage in Managed Service for ClickHouse®
© 2026 Direct Cursus Technology L.L.C.