Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • 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 Managed Service for ClickHouse®
  • Getting started
    • All tutorials
    • Adding data to a database
    • Migrating data to Managed Service for ClickHouse® using ClickHouse®
    • Migrating data to Managed Service for ClickHouse® using Data Transfer
    • Sharding tables
    • Using hybrid storage
    • Fetching data from Managed Service for Apache Kafka®
    • Fetching data from RabbitMQ
    • Exchanging data with Yandex Data Processing
    • Configuring Yandex Cloud DNS for cluster access from other cloud networks
    • Analyzing Yandex Object Storage logs using Yandex DataLens
    • Configuring Managed Service for ClickHouse® for Graphite
    • Saving a data stream from Yandex Data Streams to Managed Service for ClickHouse®
    • Migrating a database from Google BigQuery
    • Delivering data from Managed Service for Apache Kafka® using Yandex Data Transfer
    • Migrating data from Yandex Direct using Yandex Cloud Functions, Yandex Object Storage, and Yandex Data Transfer
    • Loading data from Yandex Object Storage to Managed Service for ClickHouse® using Yandex Data Transfer
    • Migrating a database from Greenplum® to ClickHouse®
    • Migrating a database from MySQL® to ClickHouse® using Yandex Data Transfer
    • Asynchronously replicating data from PostgreSQL to ClickHouse®
    • Loading data from Yandex Managed Service for YDB to Managed Service for ClickHouse® using Yandex Data Transfer
    • Copying data from Managed Service for OpenSearch to Managed Service for ClickHouse® using Yandex Data Transfer
    • Ingesting data into storage systems
    • Using parameters
    • Examples of creating QL charts
    • Web analytics with funnels and cohorts calculated based on Yandex Metrica data
    • AppMetrica: direct connection
    • AppMetrica: data export, post-processing, and visualization
    • Loading data from Yandex Metrica to a ClickHouse® data mart
    • Yandex Tracker: data export and visualization
    • Retail chain's dashboard based on a ClickHouse® database
    • Analyzing sales and locations of pizzerias based on data from a ClickHouse® database and Marketplace
    • Geocoding with the Yandex Maps API for data visualization in DataLens
    • Importing data from Object Storage, processing, and exporting it to Managed Service for ClickHouse®
    • Working with data using Query
    • Federated data queries using Query
    • Integration with an external Microsoft SQL Server database via ClickHouse® JDBC Bridge
    • Integration with an external Oracle database via ClickHouse® JDBC Bridge
  • Access management
  • Pricing policy
  • Terraform reference
  • Yandex Monitoring metrics
  • Audit Trails events
  • Public materials
  • Release notes

In this article:

  • Required paid resources
  • Getting started
  • Set up and activate the transfer
  • Test your transfer
  • Delete the resources you created
  1. Tutorials
  2. Loading data from Yandex Metrica to a ClickHouse® data mart

Loading data from Yandex Metrica to a ClickHouse® data mart

Written by
Yandex Cloud
Updated at January 22, 2026
  • Required paid resources
  • Getting started
  • Set up and activate the transfer
  • Test your 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. Set up and activate the transfer.
  2. Test your 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, storage and backup size (see Managed Service for ClickHouse® pricing).
  • Public IP addresses if public access is enabled for cluster hosts (see 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.

Set up and activate the transferSet up and activate the 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 Replication-type transfer configured to use the new endpoints.

  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 your transferTest your 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 via 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 the consumption of resources you do not need, delete them:

  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
AppMetrica: data export, post-processing, and visualization
Next
Yandex Tracker: data export and visualization
© 2026 Direct Cursus Technology L.L.C.