Datasets
How to change data in a source using DataLens?
You cannot change data in a source using DataLens.
You can process data you get from a source on the DataLens side using calculated fields.
The date field is not recognized as a string. What should I do?
DataLens uses dates in ISO format. This means that if your date in the source data is 01.01.2020
(its format is DD.MM.YYYY
), DataLens will treat it as a string.
To convert this kind of field value to the Date
type, create a new field with the formula DATE_PARSE([field_name_with_date_in_the_format_DD.MM.YYYY])
.
The DATETIME_PARSE
function works similarly and converts a string to the Date and Time
type.
How do I join two tables with the JOIN operator if the joined fields have different data types?
You can't have different data types in joined fields.
To join tables, convert the fields in the source table to the type you need.
How do I add row numbering to a table?
To add row numbering, use a calculated field, such as RSUM(MIN(1))
. For details, see Image
How do I convert a Unix time field to the DataLens Date and Time field?
To perform the conversion, convert the Unix time to seconds and use the DATETIME function. For example, to convert Unix time in milliseconds: DATETIME(1380717142785/1000)
, where the /1000
operation converts milliseconds to seconds.
For Unix time fields, the data type in DataLens is an integer or fraction.
Can I use SQL queries to generate a dataset?
You can directly access a database via the dataset creation interface using SQL queries.
How can I perform geocoding to get a point's coordinates from its address?
Previously, you could use the GEOCODE()
function for that. Now it is not available.
You can use the Yandex Maps API geocoder
See a sample Jupyter notebook
Where can I get geopolygons/geopoints for regions/districts/cities?
You can use ready-made geodata sets
The archive contains the following data:
- Countries (polygons and points).
- Russian regions (polygons and points).
- Russian cities (points).
- Districts of million-plus cities (polygons).
Why is dataset materialization not available?
Materialization is no longer supported. We recommend using a database directly. If the DB responds to DataLens analytical queries too slowly, build data marts, e.g., based on Yandex Managed Service for ClickHouse®. You can use Yandex Data Transfer to upload your data.
ClickHouse® is a registered trademark of ClickHouse, Inc