---
metadata:
  - name: generator
    content: Diplodoc Platform v5.63.0
alternate:
  - en/dataset/settings
  - ru/dataset/settings
  - href: en/dataset/settings.md
    type: text/markdown
    title: Markdown version
csp:
  - script-src:
      - https://mc.yandex.ru
    img-src:
      - https://mc.yandex.ru
    connect-src:
      - https://mc.yandex.ru
      - wss://mc.yandex.ru
    child-src:
      - 'blob:'
      - https://mc.yandex.ru
    frame-src:
      - 'blob:'
      - https://mc.yandex.ru
    frame-ancestors:
      - 'blob:'
      - https://mc.yandex.ru
canonical: en/dataset/settings.html
title: DataLens On-premises dataset settings
description: >-
  In DataLens On-premises, dataset settings decide how the dataset will use the
  source data.
vcsPath: en/dataset/settings.md
---

# DataLens On-premises dataset settings

A dataset works with sources in direct access mode: DataLens runs all data queries on the source side. Dataset settings determine how the dataset uses the source data.

## Connecting multiple tables {#multi-table}

If multiple tables are available in the data source, you can [merge](./create-dataset.md#links) them using the JOIN operator.
When the tables are joined, a link is created between them. When you create a link, you specify the fields from the source table and merged table.

You can use the following types of JOIN operators:

* [INNER](https://en.wikipedia.org/wiki/Join_(SQL)#Inner_join)
* [LEFT](https://en.wikipedia.org/wiki/Join_(SQL)#Left_outer_join)
* [RIGHT](https://en.wikipedia.org/wiki/Join_(SQL)#Right_outer_join)
* [FULL](https://en.wikipedia.org/wiki/Join_(SQL)#Full_outer_join)

## Default filters for new charts {#default-filters}

In a dataset, you can [create](./create-dataset.md#add-filters) a default filter. It will be applied to any new chart created from data in the current dataset.

{% note info %}

* You can create a filter for an individual chart in the chart settings.
* Default filters are not applied to data in the dataset preview area.

{% endnote %}

Default filters for new charts will enable you to:

* Reduce the amount of data requested from a source when building a chart.
* Add customized filters to new charts created from data in the same dataset.

## Running SQL queries in datasets {#sql-request-in-datatset}

You can define a dataset data source using ad-hoc SQL queries over database connections. When a data source is accessed, the query code runs as a subquery. For more information on how to use SQL queries in a dataset, see [Adding data](./create-dataset.md#add-data).
When using SQL queries in datasets, we recommend:

* Limiting to `read-only` the permissions of the user stated in the connection.
* Granting the `Execute` access permission for the connection and associated datasets to users who should have no ad-hoc query privileges.

You can enable or disable the use of subqueries as a source when [creating](../concepts/connection/index.md) or editing a connection.


## Default preview {#preview-default}

By default, the dataset data uploaded from the source is displayed in the preview area. You can disable default data preview. To do this, click <!-- diplodoc:svg ![image](../_assets/console-icons/gear.svg) --><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M7.199 2H8.8a.2.2 0 0 1 .2.2c0 1.808 1.958 2.939 3.524 2.034a.2.2 0 0 1 .271.073l.802 1.388a.2.2 0 0 1-.073.272c-1.566.904-1.566 3.164 0 4.069a.2.2 0 0 1 .073.271l-.802 1.388a.2.2 0 0 1-.271.073C10.958 10.863 9 11.993 9 13.8a.2.2 0 0 1-.199.2H7.2a.2.2 0 0 1-.2-.2c0-1.808-1.958-2.938-3.524-2.034a.2.2 0 0 1-.272-.073l-.8-1.388a.2.2 0 0 1 .072-.271c1.566-.905 1.566-3.165 0-4.07a.2.2 0 0 1-.073-.27l.801-1.389a.2.2 0 0 1 .272-.072C5.042 5.138 7 4.007 7 2.199c0-.11.089-.199.199-.199M5.5 2.2c0-.94.76-1.7 1.699-1.7H8.8c.94 0 1.7.76 1.7 1.7a.85.85 0 0 0 1.274.735 1.7 1.7 0 0 1 2.32.622l.802 1.388c.469.813.19 1.851-.622 2.32a.85.85 0 0 0 0 1.472 1.7 1.7 0 0 1 .622 2.32l-.802 1.388a1.7 1.7 0 0 1-2.32.622.85.85 0 0 0-1.274.735c0 .939-.76 1.7-1.699 1.7H7.2a1.7 1.7 0 0 1-1.699-1.7.85.85 0 0 0-1.274-.735 1.7 1.7 0 0 1-2.32-.622l-.802-1.388a1.7 1.7 0 0 1 .622-2.32.85.85 0 0 0 0-1.471 1.7 1.7 0 0 1-.622-2.32l.801-1.389a1.7 1.7 0 0 1 2.32-.622A.85.85 0 0 0 5.5 2.2m4 5.8a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0" clip-rule="evenodd"/></svg> → <!-- diplodoc:svg ![image](../_assets/console-icons/check.svg) --><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M13.488 3.43a.75.75 0 0 1 .081 1.058l-6 7a.75.75 0 0 1-1.1.042l-3.5-3.5A.75.75 0 0 1 4.03 6.97l2.928 2.927 5.473-6.385a.75.75 0 0 1 1.057-.081" clip-rule="evenodd"/></svg> **Enable default preview** in the top-right corner of the dataset and save the dataset. Now, when you open the dataset, the data will not appear in the preview area. To display the data, click **Preview** at the top of the screen.

#### Useful links {#see-also}

* [Working with a dataset in DataLens On-premises](./create-dataset.md)
* [Calculated fields in DataLens On-premises](../concepts/calculations/index.md)
