[Yandex Cloud documentation](../../../index.md) > [Yandex Cloud Stackland](../../index.md) > Concepts > [Components](overview.md) > DataLens

# DataLens

Yandex DataLens is a business analytics and data visualization platform. With it, you can create interactive dashboards, charts, and tables based on various data sources. The component is built upon [DataLens On-premises](https://datalens.ru/on-premises/docs/ru/).

## Main features {#features}

* Creating interactive dashboards and charts
* Connecting to PostgreSQL, ClickHouse®, and other data sources
* Shared access to collections and workbooks
* Role-based access management

## UI access {#ui}

The DataLens UI is available at `https://datalens.sys.<cluster_domain>`. Authentication is managed with Identity and Access Management.

When the component is activated for the first time, the system automatically creates the `stackland-datalens-admins` group and adds the cluster administrator to it. Members of this group get the `datalens.admin` role.

## Access management {#access}

DataLens supports three roles:

* `datalens.admin`: Full access to DataLens, including management of users, collections, workbooks, and data sources. This role is assigned in Identity and Access Management via the `stackland-datalens-admins` group.
* `datalens.creator`: Permission to create and modify objects (dashboards, charts, datasets, and connections).
* `datalens.visitor`: View-only access to published objects. This is the default role for authenticated users.

Roles are mapped to Identity and Access Management groups. To assign a user the `datalens.admin` role, add them to the `stackland-datalens-admins` group.

### Adding a user via the UI {#add-user-ui}

A DataLens administrator can add a local user via the web UI.

To add a user:

1. Open the DataLens web UI at `https://datalens.<cluster_domain>`.
1. In the left-hand menu, select **Service settings**.
1. Go to the **Users** tab.
1. Click **+ Add user**.
1. Fill in the **Add user** form with the following user details:

   * **Login** for DataLens authentication.
   * **First name**. This is an optional field.
   * **Last name**. This is an optional field.
   * **Email**. This is an optional field.
   * **Role** in DataLens: `Admin`, `Creator`, or `Visitor`.
   * **Group**: User group. This is an optional field.
   * **Password** for authentication. Click **Generate password** to create one automatically.

1. Click **Add**.

## Dependencies {#dependencies}

To use DataLens, you also need the following components:

* [Managed Service for PostgreSQL](postgresql.md): To store DataLens data.
* [Identity and Access Management](iam.md): For user authentication and authorization.

## Configuration {#configuration}

To manage the component, use the `DataLensConfig` custom resource.

Here is an example:

```yaml
apiVersion: stackland.yandex.cloud/v1alpha1
kind: DataLensConfig
metadata:
  name: main # This is a required field you must set to `main`
spec:
  enabled: true
  settings:
    clusterIssuer: "stackland-default"
    database:
      instances: 3
      storageSize: "2Gi"
      logLevel: "info"
      storageClass: ""
      resources:
        requests:
          cpu: "200m"
          memory: "256Mi"
        limits:
          cpu: "1000m"
          memory: "1Gi"
```

Where:

* `enabled`: Enables and disables the component.
* `settings.clusterIssuer`: ClusterIssuer name for TLS certificates. The default value is `stackland-default`.
* `settings.database.instances`: Number of PostgreSQL instances. The default value is one.
* `settings.database.storageSize`: Database storage size. The default value is `2Gi`.
* `settings.database.storageClass`: Storage class. Defaults to the platform's storage class.
* `settings.database.logLevel`: PostgreSQL logging level. The default value is `info`.
* `settings.database.resources`: Resources allocated for database pods:
  * `requests`: Minimum resource requirements.
  * `limits`: Maximum resource limits.

## See also {#see-also}

* [Uploading DataLens images](../../operations/datalens/install-images.md)
* [Activate DataLens](../../operations/datalens/configure.md)
* [Disabling DataLens](../../operations/datalens/disable.md)