---
metadata:
  - name: generator
    content: Diplodoc Platform v5.47.3
alternate:
  - https://yandex.com.tr/support/tracker/en/tutorials/visualisation-in-datalens.md
title: Visualizing data from Tracker
description: To visualize data from Tracker, set up regular export of data to external storage and visualize the required metrics and data using DataLens tools.
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com.tr/support/tracker/en/llms.txt


# Visualizing data from Yandex Tracker

Visualizing data from Tracker to DataLens allows you to build more advanced analytics than when using the Tracker tools.

To visualize data from Tracker to DataLens:
* Set up regular export of data to external storage.
* Visualize the required metrics and data using DataLens.

To visualize the data, follow these steps:

1. [Prepare your cloud](#before-you-begin).
1. [Create a DB for storing the Tracker data](#database-create).
1. [Create an OAuth token for Tracker access](#oauth-token).
1. [Create a Cloud Functions function for importing the data](#function-import).
1. [Create a connection to DataLens](#connection-create).
1. [Create a dataset](#dataset-create).
1. [Create a chart](#chart-create).
1. [Create a dashboard in DataLens and add charts to it](#dashboard-create).

## Getting started {#before-you-begin}


{% note info "" %}

To obtain data, [log in to Tracker](https://yandex.com.tr/support/tracker/en/user/login.md) under the account of a user with full access to the service.

{% endnote %}


<!-- source: en/_includes/before-you-begin.md -->
Sign up for Yandex Cloud and create a billing account:

1. Go to the [management console](https://console.cloud.yandex.com) and log in to Yandex Cloud or create an account if you do not have one yet.
1. On the **[Billing](https://billing.cloud.yandex.com/)** page, make sure you have a [billing account](https://yandex.cloud/en/docs/billing/concepts/billing-account) activated and its status is `ACTIVE` or `TRIAL_ACTIVE`. If you do not have a billing account, [create one](https://yandex.cloud/en/docs/billing/quickstart).

If you have an active billing account, you can create or select a folder on the [cloud page](https://console.yandex.cloud/cloud) to host your infrastructure.

[Learn more about clouds and folders](https://yandex.cloud/en/docs/resource-manager/concepts/resources-hierarchy).
<!-- endsource: en/_includes/before-you-begin.md -->

### Required paid resources {#paid-resources}
* A paid [service plan](https://yandex.com.tr/support/tracker/en/enable-tracker.md) that grants full access to Tracker.
* A continuously running Managed Service for ClickHouse® cluster (see [Managed Service for ClickHouse® pricing](https://yandex.cloud/en/docs/managed-clickhouse/pricing.md)).
* Cloud Functions function usage (see [Cloud Functions pricing](https://yandex.cloud/en/docs/functions/pricing)).

If you no longer need the resources you created, [delete them](#clear-out).

## Create a DB for storing the Tracker data {#database-create}

1. Go to the [management console](https://console.cloud.yandex.com).
1. In the top-left corner, click <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M9.5 3a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM3 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM9.5 8a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm5 0a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM13 4.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM4.5 3a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM8 14.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm6.5-1.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM3 14.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z" clip-rule="evenodd"/></svg> **All services**.
1. Select **Data platform** → **Managed Service for ClickHouse**.
1. Click **Create ClickHouse cluster**.
1. Specify the cluster parameters:
    * Basic parameters:
        * **Environment**: `PRODUCTION`.
        * **Version**: `24.8 LTS`.
    * Resources:
        * **Platform**: `Intel Ice Lake`.
        * **Type**: `Standard`.
        * **Host class**: `s3-c2-m8 (2 vCPU, 8 GB)`.
    * Storage size: `30 GB`.
    * Hosts:
        * **Public access**: `Enabled`.
    * DBMS settings:
        * **User management via SQL**: `Disabled`.
        * **Database management via SQL**: `Disabled`.
        * **Username**: `tracker_data`.
        * **DB name**: `db1`.
    * Service settings:
        * **DataLens access**: `Enabled`.
        * **Access from Serverless**: `Enabled`.
    For a full list of settings, see [Managed Service for ClickHouse® settings](https://yandex.cloud/en/docs/managed-clickhouse/concepts/settings-list).
1. Click **Create cluster**. Wait for the created cluster status to change to `Alive`.
1. Copy and save the host name for further Cloud Functions setup.


## Create an OAuth token for Tracker access {#oauth-token}

<!-- source: en/api-ref/access.md -->
{% note warning "" %}

If you use a federated or service account, authenticate using an [IAM token](#iam-token).

{% endnote %}


To get a token:



1. Go to [https://oauth.yandex.com/](https://oauth.yandex.com/).

1. On the **Your applications** page, click <svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" fill="currentColor" aria-hidden="true" class="yc-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14"><path fill="currentColor" fill-rule="evenodd" d="M7.873 13.125a.875.875 0 1 1-1.75 0V7.87H.875a.875.875 0 0 1 0-1.75h5.248V.874a.875.875 0 1 1 1.75 0V6.12h5.249a.875.875 0 0 1 0 1.751H7.873v5.255z" clip-rule="evenodd"/></svg></svg> **Create**.

1. In the window that opens, select the **For API access or debugging** option and click **Proceed to creation**.

1. Specify the application name and contact email.


1. Add permissions to access user data. To select a permission, start typing its name in the **Access name** field:
   * **Write to tracker (tracker:write)** — all data operations: create, delete, edit.
   * **Read from tracker (tracker:read)** — read-only access to data.

1. Click **Create application**.

1. In the [Yandex OAuth](https://oauth.yandex.com/) personal account, select the previously created application and copy its ID from the **ClientID** field.


1. Generate the token request link:

   ```
   https://oauth.yandex.com/authorize?response_type=token&client_id=<application_id>
   ```

1. Log in to the account on whose behalf you will work with the API and go to the generated link. 

   A sequence of characters will appear on the page — this is the OAuth token. Copy it and save it.



To check if you have access to the API, execute the [request for information about the current user](https://yandex.com.tr/support/tracker/en/api-ref/users/get-user-info.md). If access was not obtained, the request will return a response with code `401 Unauthorized`.

Example request for information about the current user using curl:

<!-- source: en/_includes/api/curl-request.md -->
{% list tabs %}

- Unix

   ```bash
   curl -X GET 'https://api.tracker.yandex.net/v3/myself' \
        -H 'Authorization: OAuth y0__xAbc******' \
        -H 'X-Org-ID: 1234******'
   ```

- Windows

   ```bash
   curl -X GET "https://api.tracker.yandex.net/v3/myself" ^
        -H "Authorization: OAuth y0__xAbc******" ^
        -H "X-Org-ID: 1234******"
   ```

{% endlist %}
<!-- endsource: en/_includes/api/curl-request.md -->
<!-- endsource: en/api-ref/access.md -->

## Create a Cloud Functions function for importing the data {#function-import}

1. Go to the [management console](https://console.cloud.yandex.com).
1. In the top-left corner, click <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M9.5 3a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM3 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM9.5 8a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm5 0a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM13 4.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM4.5 3a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM8 14.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm6.5-1.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM3 14.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z" clip-rule="evenodd"/></svg> **All services**.
1. Select **Serverless computing** → **Cloud Functions**.
1. Click **Create function**.
1. Specify a name for the function and click **Create**.
1. In the **Editor** window that opens, select `Python / 3.9` runtime environment.
1. Click **Next**.
1. In the **Method** field, click **ZIP archive**.
1. Attach a [test archive](https://github.com/yandex-cloud-examples/yc-tracker-data-import/blob/main/build/tracker-data-import.zip).
1. In the **Entry point** field, specify `tracker_import.handler`.
1. Under **Parameters**, specify:
    * **Timeout, sec**: `60`.
    * **RAM**: `1024`.
    * **Environment variables**:
        * `TRACKER_ORG_ID`: Yandex 360 for Business organization ID

           <!-- source: en/_includes/api/org-id.md -->
           To get the organization ID, go to **Administration** → [**Organizations**](https://tracker.yandex.com/admin/orgs) and copy the value from the **ID** field. {#find-id}
           <!-- endsource: en/_includes/api/org-id.md -->

        * `TRACKER_OAUTH_TOKEN`: [OAuth token](#oauth-token) of the Tracker account
        * `CH_HOST`: [Host](#database-create) name
        * `CH_DB`: [Database](#database-create) name
        * `CH_USER`: [Username](#database-create)
        * `CH_PASSWORD`: [Password](#database-create)
        * `CH_ISSUES_TABLE`: `tracker_issues`
        * `CH_CHANGELOG_TABLE`: `tracker_changelog`
        * `TRACKER_INITIAL_HISTORY_DEPTH`: `1d`
        * `CH_STATUSES_VIEW`: `v_tracker_statuses`
1. Click **Save changes**.
1. In the **Testing** tab, click **Run test**.
1. The test result is a data import log:
    ```json
    {
        "statusCode": 200,
        "headers": {
        "Content-Type": "text/plain"
        },
        "isBase64Encoded": false,
        "body": "OK"
    }
    ```
1. Create a [trigger](https://yandex.cloud/en/docs/functions/concepts/trigger) for regular exports of new data to the database:
    1. Go to the **Cloud Functions** section.
    1. Click <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M7.199 2H8.8c.11 0 .199.089.199.199 0 1.808 1.958 2.939 3.524 2.034a.199.199 0 0 1 .271.073l.802 1.388a.199.199 0 0 1-.073.271c-1.566.905-1.566 3.165 0 4.07a.199.199 0 0 1 .073.271l-.802 1.388a.199.199 0 0 1-.271.073C10.958 10.862 9 11.993 9 13.8c0 .11-.089.199-.199.199H7.2a.199.199 0 0 1-.2-.198c0-1.808-1.958-2.939-3.524-2.034a.199.199 0 0 1-.272-.073l-.8-1.388a.199.199 0 0 1 .072-.271c1.566-.905 1.566-3.165 0-4.07a.199.199 0 0 1-.073-.271l.801-1.388a.199.199 0 0 1 .272-.073C5.042 5.138 7 4.007 7 2.2c0-.11.089-.199.199-.199ZM5.5 2.199C5.5 1.26 6.26.5 7.199.5H8.8c.938 0 1.699.76 1.699 1.699a.85.85 0 0 0 1.274.735 1.699 1.699 0 0 1 2.32.622l.802 1.388c.469.812.19 1.851-.622 2.32a.85.85 0 0 0 0 1.472 1.7 1.7 0 0 1 .622 2.32l-.802 1.388a1.699 1.699 0 0 1-2.32.622.85.85 0 0 0-1.274.735c0 .938-.76 1.699-1.699 1.699H7.2c-.938 0-1.699-.76-1.699-1.699a.85.85 0 0 0-1.274-.735 1.698 1.698 0 0 1-2.32-.622l-.802-1.388a1.699 1.699 0 0 1 .622-2.32.85.85 0 0 0 0-1.472 1.699 1.699 0 0 1-.622-2.32l.801-1.388a1.699 1.699 0 0 1 2.32-.622A.85.85 0 0 0 5.5 2.2Zm5 6.667a1 1 0 0 0 0-1.732l-3-1.732a1 1 0 0 0-1.5.866v3.464a1 1 0 0 0 1.5.866l3-1.732Z" clip-rule="evenodd"/></svg> → **Create trigger**.
    1. Set the trigger type to **Timer**.
    1. In the **Cron expression** field, select `Every day`.
    1. Under **Function settings**, click **Create new**.
    1. Enter the account name. By default, the account is assigned the `functions.functionInvoker` role to use the trigger.
    1. Click **Create**.
    1. Click **Create trigger**.

## Create a connection in DataLens {#connection-create}

1. Open your [Managed Service for ClickHouse®](#database-create) **cluster**.
1. On the left side of the window, select <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M11.5 3.5h2a.5.5 0 0 1 .5.5v8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1-.5-.5V4a.5.5 0 0 1 .5-.5Zm-2.5 9a.5.5 0 0 0 .5-.5V7a.5.5 0 0 0-.5-.5H7a.5.5 0 0 0-.5.5v5a.5.5 0 0 0 .5.5h2Zm-4.5 0A.5.5 0 0 0 5 12v-2a.5.5 0 0 0-.5-.5h-2a.5.5 0 0 0-.5.5v2a.5.5 0 0 0 .5.5h2Zm-1 1.5h-1a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2h2c.173 0 .34.022.5.063V7a2 2 0 0 1 2-2h2c.173 0 .34.022.5.063V4a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-10Z" clip-rule="evenodd"/></svg> **DataLens**.
1. Click **Create connection**.
1. Specify the connection settings:
    * **Connection**: `Select in a folder`.
    * **Cluster**: Cluster specified when [creating a database](#database-create).
    * **Hostname**: Host specified when [creating a database](#database-create).
    * **HTTP interface port**: `8443`.
    * **Username**: Username specified when [creating a database](#database-create).
    * **Password**: Password specified when [creating a database](#database-create).
    * **Cache TTL in seconds**: `Default`.
    * **Raw SQL level**: `Forbid`.
    * **HTTPS**: `Enabled`.

      ![Настройки подключения](../_assets/datalens-connection-settings.png =680x665)

1. Click **Create connection**.

## Create a dataset {#dataset-create}

1. Go to the [connections page](https://datalens.yandex.cloud//connections).
1. Select a [connection](#connection-create).
1. In the top-right corner, click **Create dataset**.
1. Drag one or more tables to the workspace:
    * `db1.v_tracker_issues`: Current (most recent) issue cross-section.
    * `db1.v_tracker_changelog`: Issue parameter change history.
    * `Db1.v_tracker_statuses`: Status transition time based on the issue change history.
1. Click **Save**.

## Create a chart {#chart-create}

1. Go to the [DataLens](https://datalens.yandex.cloud/) home page.
1. Click **Create chart**.
1. In the top left corner, click <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M6.576 11.854a4 4 0 1 1 0-7.707A5.482 5.482 0 0 0 5 8c0 1.5.601 2.861 1.576 3.854ZM8 12.9a5.5 5.5 0 1 1 0-9.8 5.5 5.5 0 1 1 0 9.8Zm1.424-8.754A4.003 4.003 0 0 1 14.5 8a4 4 0 0 1-5.076 3.854A5.483 5.483 0 0 0 11 8c0-1.5-.601-2.861-1.576-3.854ZM8 4.877C8.914 5.61 9.5 6.737 9.5 8c0 1.263-.586 2.39-1.5 3.123A3.993 3.993 0 0 1 6.5 8c0-1.263.586-2.39 1.5-3.123Z" clip-rule="evenodd"/></svg> **Select dataset**.
1. In the **Datasets** drop-down list, select the [dataset](#dataset-create) you created in the previous step.
1. On the top panel, select a [visualization type](https://yandex.cloud/en/docs/datalens/visualization-ref). By default, the **Column chart** type is selected.

## Create a dashboard and add charts to it {#dashboard-create}

1. On the [DataLens](https://datalens.yandex.cloud/) home page, click **Create dashboard**.
1. At the top of the [dashboard](#dashboard-create) page, click **Add** → **Chart**.
1. Fill in the widget parameters. Pay close attention to the following fields:
    * **Name**: Sets the name of the widget. It is displayed at the top of the widget.
    * **Chart**: Sets the widget to add.
    * **Description**: Sets the description of the widget. It is displayed at the bottom of the widget.
    * **Auto height**: Sets the automatic height for **Table** and **Markdown** widgets. If this parameter is disabled, you can set the height of the widget on the page using the mouse.
1. Click **Add**. The widget will be displayed on the dashboard.
1. Save the dashboard:

   1. In the top-right corner of the dashboard, click **Save**.
   1. Enter a name for the dashboard and click **Create**.

   For more information about setting up dashboards, see [DataLens dashboard](https://yandex.cloud/en/docs/datalens/concepts/dashboard).

{% cut "Sample dashboard based on data from the `v_tracker_issues` table" %}

![Sample dashboard based on data from the v_tracker_issues table](../_assets/dashboard-from-table-issues.png)

{% endcut %}

{% cut "Sample dashboard based on data from the `db1.v_tracker_statuses` table" %}

![Sample dashboard based on data from the db1.v_tracker_statuses table](../_assets/dashboard-from-table-statuses.png)

{% endcut %}

## How to delete the resources you created {#clear-out}

To stop paying for the resources you created:
* [Delete the ClickHouse® cluster](https://yandex.cloud/en/docs/managed-clickhouse/operations/cluster-delete).
* [Delete the Cloud Functions function](https://yandex.cloud/en/docs/functions/operations/function/function-delete).

<!-- source: en/_includes/clickhouse-disclaimer.md -->
_ClickHouse® is a registered trademark of [ClickHouse, Inc](https://clickhouse.com)._
<!-- endsource: en/_includes/clickhouse-disclaimer.md -->



