Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
© 2022 Yandex.Cloud LLC
Yandex DataLens
  • Getting started
  • Practical guidelines
    • All tutorials
    • Visualizing data from a CSV file
    • Creating and publishing a chart with a map of Moscow from a CSV file
    • Analyzing a retail chain's sales from a ClickHouse database
    • Analyzing public data on road accidents in Russia
    • Analyzing sales and locations of pizzerias based on data from Clickhouse DB and Marketplace
    • Web analytics with a connection to Yandex Metrica
    • Web analytics with funnels and cohorts calculated based on Yandex Metrica data
    • Mobile app analytics based on AppMetrica data
    • Analyzing Yandex Music podcast statistics (for podcasters)
    • Visualizing data with a QL chart
    • Building customer journey charts based on AppMetrica data
  • Concepts
    • Service overview
    • Connection
    • Data types
    • Datasets
      • Overview
      • Data model
      • Dataset settings
    • Charts
      • Overview
      • Chart types
      • Chart settings
    • Dashboards
    • Combining data
    • Using Markdown in DataLens
    • DataLens Public
    • Aggregations in DataLens
    • Calculated fields
      • Overview
      • Formula syntax
    • Marketplace
    • Backups
    • Caching
    • Quotas and limits
    • Organizations in DataLens
  • Step-by-step instructions
    • All instructions
    • Working with connections
      • Creating a ClickHouse connection
      • Creating a connection to a CSV file
      • Creating a Google Sheets connection
      • Creating a MySQL connection
      • Creating a PostgreSQL connection
      • Creating an MS SQL Server connection
      • Creating an Oracle Database connection
      • Creating a YDB connection
      • Creating a Yandex Metrica API connection
      • Creating an AppMetrica connection
      • Creating a Yandex Cloud Billing connection
      • Creating a Greenplum connection
      • Managing connection access
    • Working with datasets
      • Creating a dataset
      • Combining data from multiple tables
      • Combining data from multiple CSV connections
      • Creating a data field
      • Creating a calculated data field
      • Creating a default filter for new charts
      • Updating fields in datasets
      • Describing a dataset via a source SQL query
      • Dataset materialization
      • Managing dataset access
      • Managing access to data rows
    • Working with charts
      • Creating a line chart
      • Creating an area chart
      • Creating a pie chart
      • Creating a ring chart
      • Creating a column chart
      • Creating a bar chart
      • Creating a scatter chart
      • Creating a map
      • Creating a table
      • Creating a pivot table
      • Creating an indicator
      • Creating a tree chart
      • Creating a QL chart
      • Creating a multi-dataset chart
      • Adding a hierarchy
      • Configuring the navigator
      • Publishing a chart
      • Managing chart access
      • Adding guid as a parameter
    • Working with dashboards
      • Creating dashboards
      • Adding charts to dashboards
      • Adding selectors to dashboards
      • Creating an alias
      • Deleting an alias field
      • Publishing dashboards
      • Managing dashboard access
      • Dashboard auto-update
    • Working with permissions
      • Granting permissions
      • Deleting permissions
      • Request permissions
    • Working with DataLens Marketplace
      • Adding a product from Marketplace
      • Removing a product from Marketplace
      • Creating and using a connector (for partners)
    • Working with organizations
      • Switching between DataLens instances
  • Access management
    • Managing access to DataLens
    • Managing access at the data row level
  • Pricing policy
  • Function reference
    • All Functions
    • Aggregate functions
      • Overview
      • ALL_CONCAT
      • ANY
      • ARG_MAX
      • ARG_MIN
      • AVG
      • AVG_IF
      • COUNT
      • COUNTD
      • COUNTD_APPROX
      • COUNTD_IF
      • COUNT_IF
      • MAX
      • MEDIAN
      • MIN
      • QUANTILE
      • QUANTILE_APPROX
      • STDEV
      • STDEVP
      • SUM
      • SUM_IF
      • TOP_CONCAT
      • VAR
      • VARP
    • Array functions
      • Overview
      • ARRAY
      • ARR_STR
      • CONTAINS
      • COUNT_ITEM
      • GET_ITEM
      • SLICE
      • STARTSWITH
      • UNNEST
    • Date/Time functions
      • Overview
      • DATEADD
      • DATEPART
      • DATETRUNC
      • DAY
      • DAYOFWEEK
      • HOUR
      • MINUTE
      • MONTH
      • NOW
      • QUARTER
      • SECOND
      • TODAY
      • WEEK
      • YEAR
    • Geographical functions
      • Overview
      • GEOCODE
      • GEOINFO
      • TOPONYM_TO_GEOPOINT
      • TOPONYM_TO_GEOPOLYGON
    • Logical functions
      • Overview
      • CASE
      • IF
      • IFNULL
      • ISNULL
      • ZN
    • Mathematical functions
      • Overview
      • ABS
      • ACOS
      • ASIN
      • ATAN
      • ATAN2
      • CEILING
      • COS
      • COT
      • DEGREES
      • DIV
      • EXP
      • FLOOR
      • GREATEST
      • LEAST
      • LN
      • LOG
      • LOG10
      • PI
      • POWER
      • RADIANS
      • ROUND
      • SIGN
      • SIN
      • SQRT
      • SQUARE
      • TAN
    • Operators
      • Overview
      • AND
      • Addition and concatenation (+)
      • BETWEEN
      • Comparison
      • Division (/)
      • IN
      • IS FALSE
      • IS TRUE
      • LIKE
      • Modulo (%)
      • Multiplication (*)
      • NOT
      • Negation (-)
      • OR
      • Power (^)
      • Subtraction (-)
    • String functions
      • Overview
      • ASCII
      • CHAR
      • CONCAT
      • CONTAINS
      • ENDSWITH
      • FIND
      • ICONTAINS
      • IENDSWITH
      • ISTARTSWITH
      • LEFT
      • LEN
      • LOWER
      • LTRIM
      • REGEXP_EXTRACT
      • REGEXP_EXTRACT_NTH
      • REGEXP_MATCH
      • REGEXP_REPLACE
      • REPLACE
      • RIGHT
      • RTRIM
      • SPACE
      • SPLIT
      • STARTSWITH
      • SUBSTR
      • TRIM
      • UPPER
      • UTF8
    • Text markup functions
      • Overview
      • BOLD
      • ITALIC
      • MARKUP
      • URL
    • Time series functions
      • Overview
      • AGO
      • AT_DATE
    • Type conversion functions
      • Overview
      • BOOL
      • DATE
      • DATETIME
      • DATETIME_PARSE
      • DATE_PARSE
      • DB_CAST
      • FLOAT
      • GEOPOINT
      • GEOPOLYGON
      • INT
      • STR
    • Window functions
      • Overview
      • AVG
      • AVG_IF
      • COUNT
      • COUNT_IF
      • FIRST
      • LAG
      • LAST
      • MAVG
      • MAX
      • MCOUNT
      • MIN
      • MMAX
      • MMIN
      • MSUM
      • RANK
      • RANK_DENSE
      • RANK_PERCENTILE
      • RANK_UNIQUE
      • RAVG
      • RCOUNT
      • RMAX
      • RMIN
      • RSUM
      • SUM
      • SUM_IF
    • Function Availability
  • Tutorial on functions
    • Aggregate functions
    • Window functions
    • LOD expressions and filtering in aggregate functions
  • Public materials
    • Educational projects
    • Webinars and conferences
    • Articles and publications
    • Public dashboards and charts
  • Troubleshooting
    • Questions and answers
    • DataLens errors
  1. Getting started

Getting started with DataLens

Written by
Yandex Cloud
  • Create a connection
  • Create a dataset
  • Create a column chart
  • Create an area chart
  • Create a map
  • Create a dashboard
  • Add charts to the dashboard
  • Add a selector to the dashboard
  • What's next

In this tutorial, you'll create your first dataset, build several charts to visualize data, and place them on a dashboard.

To get started with DataLens:

New user
I'm already using Yandex Cloud
  1. Log in to your Yandex account. If you don't have an account, create one.
  2. Open the homepage DataLens.
  3. Click Open Datalens.
  4. Click Log in.
  1. Log in to your Yandex account.

  2. Open the homepage DataLens.

  3. Click Open Datalens.

  4. Select one of the options:

    • If you already have an organization, select it from the drop-down menu in the Organizations tab and click Open DataLens.

      Note

      To activate a DataLens instance, the user must have the admin or owner role. For more information about roles, see Granting permissions.

    • If you have a cloud but no organization, click Add new DataLens. In the window that opens, enter your organization's name and description and click Create organization and DataLens. For more information about working with organizations, see Getting started with organizations.

If you have a technical question about the service, please contact support. To ask for advice or discuss the solution to your problem or best service practices, write to the DataLens chat in Telegram.

Create a connection

  1. Go to the connections page.

  2. Click Create connection.

  3. Select the ClickHouse connection.

    1. In the window that opens, specify the connection parameters:

      • Connection type — Specify manually.
      • Host name — rc1a-ckg8nrosr2lim5iz.mdb.yandexcloud.net.
      • HTTP interface port — 8443 (default).
      • Username — samples_ro.
      • Password — MsgfcjEhJk.
    2. Enable the HTTPS option and Allow subqueries in datasets and queries from charts.

    3. Check the connection and click Create connection.

    4. Enter Sample ClickHouse as your connection name.

    5. Click Create.

    create-connection

Wait for the connection to be saved.

Create a dataset

  1. In the upper-right corner, click Create dataset.

  2. Drag the MS_SalesMiniTable table to the workspace.

    drag-table

  3. Go to the Fields tab.

  4. In the Aggregation column, select Sum for the Sales field.

  5. Create a measure for the number of orders.

    1. Rename the OrderID field to OrderCount.
    2. Change the aggregation type to Number of unique.
  6. For the ShopAddressCoord field, change the data type to Geopoint.

  7. Click Save in the upper-right corner to save the dataset.

  8. Enter the dataset name and click Create.

    create-dataset

Create a column chart

  1. In the upper-right corner, click Create chart.

  2. For the visualization type, choose Column chart.

  3. Add the product subcategory to the chart. To do this, drag the ProductSubcategory field from the Dimensions section to the X section.

  4. Add a sales measure to the chart. To do this, drag the Sales field from the Measures section to the Y section.

  5. Sort the chart in descending order of sales measure. Drag the Sales field from the Measures section to the Sorting section.

  6. Save the chart.

    1. In the upper-right corner, click Save.
    2. In the window that opens, enter the Sales by subcategory name for the chart and click Save.

    create-chart-1

Create an area chart

  1. In the created chart, select Area chart as the visualization type.

  2. Replace the product subcategories with the order date on the X-axis. From the Dimensions section, drag the OrderDate field to the X section and hold it over the ProductSubcategory field until it turns red.

  3. Add the product category to the chart. To do this, drag the ProductCategory field from the Dimensions section to the Colors section.

  4. Display the chart by week.

    1. Click the calendar icon next to the OrderDate field in the X section.
    2. In the drop-down list of grouping options, select Week under Grouping.
    3. Click Apply.
  5. Save the chart.

    1. Click the down arrow next to the Save button in the upper-right corner.

    2. Choose Save as.

    3. In the window that opens, enter the Sales by week name for the new chart and click Save.

      create-chart-2

Create a map

  1. In the created chart, select Map as the visualization type.

  2. Add the coordinates of the points of sale to the map. To do this, drag the ShopAddressCoord field from the Dimensions section to the Points (Geopoints) section.

  3. Change the point size based on the number of orders. To do this, drag the OrderCount field from the Measures section to the Points size section.

  4. Change the point color based on the sales measure. To do this, drag the Sales field from the Measures section to the Colors section.

  5. Add the following fields to the Tooltips section:

    • ShopAddress
    • ShopName
    • Sales
    • OrderCount
  6. Save the chart.

    1. Click the down arrow next to the Save button in the upper-right corner.

    2. Choose Save as.

    3. In the window that opens, enter the Sales map name for the new chart and click Save.

      create-chart-3

Create a dashboard

  1. Go to the DataLens homepage.
  2. Click Create dashboard.
  3. Enter a name for the dashboard and click Create.

Add charts to the dashboard

  1. In the upper-right corner, click Add and choose Chart.

  2. In the window that opens, click Select.

  3. Select the Sales map chart. This will automatically fill in the Title field.

  4. Click Add.

  5. Repeat the steps to add the Sales by subcategory and the Sales by week charts.

  6. Position the charts on the dashboard however you like.

    add-charts

Add a selector to the dashboard

  1. Click Add and choose Selector.

  2. Add the calendar selector for the order date.

    1. Select the created dataset.
    2. Select the OrderDate field.
    3. This will automatically fill in the Title field. Click the Show checkbox next to the selector title.
    4. Select the Calendar type.
    5. Enable Range.
    6. Click Add.
  3. Position the selector on the dashboard wherever you like.

  4. Save the dashboard. To do this, click Save in the upper-right corner.

    add-selectors

What's next

  • Review the tutorials for examples of using the service.
  • Read about service concepts.
  • See step-by-step instructions.
  • Look at an example ready-made dashboard.

Was the article helpful?

Language / Region
© 2022 Yandex.Cloud LLC
In this article:
  • Create a connection
  • Create a dataset
  • Create a column chart
  • Create an area chart
  • Create a map
  • Create a dashboard
  • Add charts to the dashboard
  • Add a selector to the dashboard
  • What's next