Getting Started with DataLens: An All-In-One Guide

Mar 12, 2024 | Programming

Welcome to the modern world of business intelligence with DataLens, a comprehensive data visualization and business intelligence system developed by Yandex. Whether you’re looking to analyze data or visualize complex statistics, this guide will help you set up DataLens swiftly.

Installation Prerequisites

Before diving into installation, ensure you have DataLens and Docker ready. Depending on your OS, follow these steps:

Running DataLens Containers

To fire up those DataLens containers, all you need is a simple command line. Picture this process much like preparing a complex meal. You begin by gathering all necessary ingredients – in this case, code snippets – and then you start cooking:

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

This command is like assembling your ingredients; it clones the DataLens repository and starts the essential containers, creating an environment where data can be processed and visualized.

To connect with an external metadata database, denote the following command:

METADATA_POSTGRES_DSN_LIST=postgres:user:password@host:port/database HC=1 docker compose up

In this delicious model, consider the connection strings as unique spices needed for your specific recipe, enriching your outcome. Once executed, you can access the DataLens UI at http://localhost:8080. If another flavor (port) is desired, simply modify it using the UI_PORT env variable:

UI_PORT=8081 docker compose up

Enabling Yandex Maps

For those adventurous souls looking to incorporate geographic data visualizations, activating Yandex Maps is a blissful cherry on top:

YANDEX_MAP_ENABLED=1 YANDEX_MAP_TOKEN=YOUR_API_KEY docker compose up

Updating DataLens

To keep your DataLens fresh and up-to-date, simply pull the latest configuration and restart:

docker compose down  
git pull  
docker compose up

Your user settings will remain safely stored in the metadata folder while providing you with the latest features.

Parts of DataLens Project

DataLens is composed of three key components:

  • UI: A Single Page Application (SPA) powered by Node.js.
  • Backend: Python applications that connect to data sources.
  • United Storage (US): A Node.js service using PostgreSQL to store metadata.

Authentication (Beta)

To secure your DataLens instance, authentication is available via Zitadel. Activate it using:

bash init.sh

There’s a special compose file designated for authentication, so remember to use:

HC=1 docker compose -f docker-compose.zitadel.yml up

Troubleshooting

If you encounter challenges such as application startup issues with external databases or needing to install essential PostgreSQL extensions, consider these troubleshooting tips:

  • Verify your database user’s permissions for installing necessary extensions.
  • For managed databases, consult your provider’s documentation on how to handle extensions.

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

Conclusion

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.

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

Tech News and Blog Highlights, Straight to Your Inbox