Yandex Cloud
Documentation
PresentationContact UsTry it for free
© 2026 Direct Cursus Technology L.L.C.
Yandex Data Transfer
  • Available transfers
  • Getting started
    • All guides
    • Preparing for a transfer
      • Managing endpoints
      • Migrating endpoints to a different availability zone
        • Origin
    • Managing transfer process
    • Working with databases during transfer
    • Monitoring transfer status
  • Troubleshooting
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Public materials

In this article:

  • Yandex Metrica data transfer scenarios
  • Configuring the Metrica source endpoint
  • Configuring the target
  1. Step-by-step guides
  2. Configuring endpoints
  3. Metrica
  4. Origin

Transferring data from a Yandex Metrica source endpoint

Written by
Yandex Cloud
Updated at November 10, 2026
View in Markdown
  • Yandex Metrica data transfer scenarios
  • Configuring the Metrica source endpoint
  • Configuring the target

Data Transfer enables you to transfer data from a Yandex Metrica tag to a Yandex Cloud managed database.

  1. Review possible data transfer scenarios.
  2. Set up a source endpoint in Yandex Data Transfer.
  3. Set up one of the supported data targets.
  4. Create and launch the transfer.
  5. Perform the required database tasks while monitoring the transfer status.
  6. If you run into any problems, check the available solutions for troubleshooting.

Yandex Metrica data transfer scenariosYandex Metrica data transfer scenarios

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.

See this tutorial on how to transfer Yandex Metrica tag data to a ClickHouse® cluster.

For a detailed description of other possible Yandex Data Transfer scenarios, see Tutorials.

Configuring the Metrica source endpointConfiguring the Metrica source endpoint

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.

When creating or updating an endpoint, configure access to Yandex Metrica.

Management console
Terraform
API
  • Tag numbers: Specify the numbers of the tags the data will be coming from.

  • Token: Specify the token required to access the tags. To obtain it, follow this link. The token’s validity period is one year. In this case, the following applies:

    • Activated transfers continue to operate after the token expires.
    • Modifying the list of counters you need to transfer will trigger a transfer error if the token has expired or if the token owner lacks access to the counters.
    • Deactivating a transfer deletes the export, so you will need a current token to reactivate it. In the event of a transfer error, the export is preserved, and reactivation does not require a token refresh.
  • Optionally, specify a time interval to export data for. This option is supported for the Snapshot and increment transfer type. The end date must be at least 7 days later than the start date.

  • Hits: Select whether information about hits should be transferred.

    • Fields: Select the hit fields to export. In addition to the fields you select, there are certain mandatory fields that are always exported.
  • Sessions: Select whether information about sessions (visits) should be transferred.

    • Fields: Select the session fields to export. In addition to the fields you select, there are certain mandatory fields that are always exported.
  • Endpoint type: metrika_source.

  • counter_ids: Numbers of the tags that will send data.

  • token.raw: Token required to access the tags. To obtain it, follow this link. The token’s validity period is one year. In this case, the following applies:

    • Activated transfers continue to operate after the token expires.
    • Modifying the list of counters you need to transfer will trigger a transfer error if the token has expired or if the token owner lacks access to the counters.
    • Deactivating a transfer deletes the export, so you will need a current token to reactivate it. In the event of a transfer error, the export is preserved, and reactivation does not require a token refresh.
  • streams: Parameters of transmitted data:

    • type: Data type. Specify one of these values:

      • METRIKA_STREAM_TYPE_HITS: Hits (obsolete, not updated)
      • METRIKA_STREAM_TYPE_HITS_V2: Hits
      • METRIKA_STREAM_TYPE_VISITS: Visits
    • columns: List of fields to export. You can view them in the management console. In addition to the fields you select, there are certain required fields that are always exported.

Configuration file structure example:

resource "yandex_datatransfer_endpoint" "<endpoint_name_in_Terraform>" {
  name = "<endpoint_name>"
  settings {
    metrika_source {
      counter_ids = [<tag_numbers>]
      token {
        raw = "<token>"
      }
      streams {
        type    = "<data_type>"
        columns = ["<field_list>"]
      }
    }
  }
}
  • counterIds: Numbers of the tags that will send data.

  • token.raw: Token required to access the tags. To obtain it, follow this link. The token’s validity period is one year. In this case, the following applies:

    • Activated transfers continue to operate after the token expires.
    • Modifying the list of counters you need to transfer will trigger a transfer error if the token has expired or if the token owner lacks access to the counters.
    • Deactivating a transfer deletes the export, so you will need a current token to reactivate it. In the event of a transfer error, the export is preserved, and reactivation does not require a token refresh.
  • streams: Parameters of transmitted data:

    • type: Data type. Specify one of these values:

      • METRIKA_STREAM_TYPE_HITS: Hits (obsolete, not updated)
      • METRIKA_STREAM_TYPE_HITS_V2: Hits
      • METRIKA_STREAM_TYPE_VISITS: Visits
    • columns: List of fields to export. You can view them in the management console. In addition to the fields you select, there are certain required fields that are always exported.

For more about the settings, see this guide.

Configuring the targetConfiguring the target

Configure the supported data target:

ClickHouse®.

For a full list of sources and targets supported in Yandex Data Transfer, see Available transfers.

Once you have configured the source and target, create and launch the transfer.

ClickHouse® is a registered trademark of ClickHouse, Inc.

Was the article helpful?

Previous
Target
Next
Origin
© 2026 Direct Cursus Technology L.L.C.