How to Get Started with DataLens: A Complete Guide

Feb 10, 2023 | Data Science

DataLens is a robust business intelligence and data visualization tool developed by Yandex, which can seamlessly integrate with the Yandex Cloud platform. This guide will walk you through the steps needed to install, configure, and run DataLens, whether on Docker or via cloud services. Ready to dive in?

Getting Started with Installation

Before you can visualize your data, you need to have Docker installed on your machine. Below are guides to help you set it up on different platforms:

Running DataLens Containers

Once Docker is installed, you can run DataLens containers with a simple command. Think of this process as planting a garden: you have to first sow the seeds (pull the repository), and then water them (run the containers) to see the blossoms (your DataLens interface).

git clone https://github.com/datalens-tech/datalens
cd datalens
HC=1 docker compose up

This command initializes all the required containers, making the user interface accessible at http://localhost:8080. If you wish to run it on a different port, such as 8081, you can adjust it with the following command:

UI_PORT=8081 docker compose up

Customizing DataLens

DataLens provides options to enable Yandex Maps and customize the metadata database.

Enabling Yandex Maps

To enable Yandex Maps visualization, include the following parameters during launch:

YANDEX_MAP_ENABLED=1 YANDEX_MAP_TOKEN=YOUR_API_KEY docker compose up

Using Highcharts and D3.js

By default, DataLens employs Highcharts for visualizations. If you enable Highcharts, ensure compliance with their license here. Alternatively, if you disable it, D3.js will take over, albeit with limited visualization support initially.

Updating DataLens

Updating DataLens is straightforward. Here’s a quick sequence of commands to refresh your installation:

docker compose down
git pull
docker compose up

Your user settings will persist in the metadata folder, so there’s no need to worry about losing configurations.

Understanding the Project Structure

DataLens comprises three main components:

  • UI: The Single Page Application for user interaction.
  • Backend: Python applications for data processing and query handling.
  • UnitedStorage (US): Manages PostgreSQL storage for metadata.

Troubleshooting Common Issues

If you encounter any issues while using DataLens, consider the following resolutions:

  • Metadata Storage: DataLens stores its metadata in a designated folder. If you want to reset your settings, simply delete this folder.
  • Database Extensions: If the application fails to start with the METADATA_POSTGRES_DSN_LIST parameter, ensure that your PostgreSQL user has rights to install necessary extensions. You can manually install them using the following SQL commands:
  • CREATE EXTENSION IF NOT EXISTS pg_trgm;
    CREATE EXTENSION IF NOT EXISTS btree_gin;
    CREATE EXTENSION IF NOT EXISTS btree_gist;
    CREATE EXTENSION IF NOT EXISTS uuid-ossp;
  • Custom Certificate Configuration: If your connection fails due to certificates, ensure you provide them correctly and test your connection string.

For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

Minimum System Requirements

To ensure optimal performance of DataLens, here are the minimal system requirements:

  • RAM: 4 GB
  • CPU: 2 Cores

At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Conclusion

With these guidelines, you should be well on your way to harnessing the full potential of DataLens. Happy data visualizing!

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox