> For the complete documentation index, see [llms.txt](https://docs.collibra.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.collibra.com/data-quality-self-hosted/admin-configuration/admin-console/connections/limiting-schemas.md).

# Limiting schemas

Limiting schemas allows you to manage usage and restrict visibility to only the necessary schemas of JDBC connections in the [Explorer](/data-quality-self-hosted/core-concepts/explorer/create-a-dq-job/connect-to-a-data-source.md) tree. This helps to reduce the clutter from excess schemas, which allows you to access the data you need more quickly.

{% hint style="info" %}
When you include a restricted schema in the query of a DQ Job, the query scope may be overwritten when the job runs. While only the schemas you selected when you set up the connection are shown in the Explorer menu, users are not restricted from running SQL queries on any schema from the data source.
{% endhint %}

## Prerequisites

You have:

* ROLE\_ADMIN or ROLE\_CONNECTION\_MANAGER

## Limiting schemas on new connections

{% hint style="info" %}

* Limiting schemas on connections limits the available schemas in Explorer and the Connections step when [setting up an integration](/data-quality-self-hosted/integrations/configuring-a-new-integration.md) with Collibra Platform.
* If you plan to use the limit schemas option, avoid replacing or modifying schemas in your connection after running a job. Doing so may result in an expected scenario where the selectable columns in the Rule Workbench reference the new schema instead of the schemas of the original job.
* The schema limit feature (limit\_schema) does not apply when eager fetch is enabled. If you configure limit\_schema on a connection to restrict visible schemas, this restriction is bypassed when the Explorer uses eager fetch mode. As a result, schemas you intended to hide may become visible.
  {% endhint %}

{% stepper %}
{% step %}
On the main menu, click <img src="https://4121921244-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWCrP7Albs8DfJjIQxUxw%2Fuploads%2Fgit-blob-75245abf5c50ddf56f1d2d727ccaacf757d11145%2Fcogwheel-large%402x.png?alt=media" alt="" data-size="line">, then click **Connections**.
{% endstep %}

{% step %}
Click **Connections**.\ <i class="fa-chevrons-right">:chevrons-right:</i> The **Connection Management** page opens.
{% endstep %}

{% step %}
Click **Add Connection** on the upper right side of the page.\ <i class="fa-chevrons-right">:chevrons-right:</i> The **Add New Connection** dialog opens to the JDBC Connections tab with a list of [supported JDBC data sources](/data-quality-self-hosted/connections/supported-connections/supported-jdbc-data-sources.md).
{% endstep %}

{% step %}
Click a data source.\ <i class="fa-chevrons-right">:chevrons-right:</i> The **Add Connection** template appears.
{% endstep %}

{% step %}
Enter the [required information](/data-quality-self-hosted/connections/connect-to-a-jdbc-or-remote-file-data-source.md), and select the **Limit Schemas** option on the Details tab.

{% hint style="warning" %}
The required information in the connection may vary depending on your connection type. However, you must enable the **Limit Schemas** option to limit schemas from your connection.
{% endhint %}
{% endstep %}

{% step %}
Click **Submit**.
{% endstep %}

{% step %}
From the Connections page, on the far right side of the row containing your newly created connection, click **Actions**, then click **Limit Schemas**.\ <i class="fa-chevrons-right">:chevrons-right:</i> The **Limit Schema Mapping** dialog appears.
{% endstep %}

{% step %}
Limit schemas by moving them from the **Included** box to the **Not included** box. To do this, select the schema(s) you wish to limit, then click <img src="https://4121921244-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWCrP7Albs8DfJjIQxUxw%2Fuploads%2Fgit-blob-6a7c7a806e6f4e24a51783c46471c3a50bc1d56b%2Fdq-next-arrow-icon.png?alt=media" alt="" data-size="line">. You can also use the search fields to filter schemas.

{% hint style="info" %}
You can remove included schemas by selecting them from the **Included** box, then clicking <img src="https://4121921244-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWCrP7Albs8DfJjIQxUxw%2Fuploads%2Fgit-blob-0c37423f41105659535aad8c652febf274e81249%2Fdq-previous-arrow-icon.png?alt=media" alt="" data-size="line"> to move them to the **Not included** box.
{% endhint %}

![screenshot of the limit schema mapping dialog](https://4121921244-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWCrP7Albs8DfJjIQxUxw%2Fuploads%2Fgit-blob-16f259f97cac4188320af50bfaab7fb0dc212b39%2Fdq-limit-schemas.png?alt=media)
{% endstep %}

{% step %}
Click **Submit**.\ <i class="fa-chevrons-right">:chevrons-right:</i> The schemas you added to the "Not included" box in the Limit Schema Mapping dialog are no longer visible in the [Explorer](/data-quality-self-hosted/core-concepts/explorer/create-a-dq-job/connect-to-a-data-source.md) tree.
{% endstep %}
{% endstepper %}

## Limiting schemas on existing connections

{% hint style="info" %}

* Limiting schemas on connections limits the available schemas in Explorer and the Connections step when [setting up an integration](/data-quality-self-hosted/integrations/configuring-a-new-integration.md) with Collibra Platform.
* If you plan to use the limit schemas option, avoid replacing or modifying schemas in your connection after running a job. Doing so may result in an expected scenario where the selectable columns in the Rule Workbench reference the new schema instead of the schemas of the original job.
* The schema limit feature (limit\_schema) does not apply when eager fetch is enabled. If you configure limit\_schema on a connection to restrict visible schemas, this restriction is bypassed when the Explorer uses eager fetch mode. As a result, schemas you intended to hide may become visible.
  {% endhint %}

{% stepper %}
{% step %}
On the main menu, click <img src="https://4121921244-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWCrP7Albs8DfJjIQxUxw%2Fuploads%2Fgit-blob-75245abf5c50ddf56f1d2d727ccaacf757d11145%2Fcogwheel-large%402x.png?alt=media" alt="" data-size="line">, then click **Connections**.
{% endstep %}

{% step %}
Click **Connections**.\ <i class="fa-chevrons-right">:chevrons-right:</i> The **Connection Management** page opens.
{% endstep %}

{% step %}
On the far right side of the row containing an existing JDBC connection, click **Actions**, then click **Edit**.\ <i class="fa-chevrons-right">:chevrons-right:</i> The **Edit Connection** template appears.
{% endstep %}

{% step %}
Select the **Limit Schemas** option.

{% hint style="warning" %}
You must enable the **Limit Schemas** option on the Details tab to limit schemas from your connection.
{% endhint %}
{% endstep %}

{% step %}
Click **Submit**.
{% endstep %}

{% step %}
On the far right side of the row containing an existing JDBC connection, click **Actions**, then click **Limit Schemas**.\ <i class="fa-chevrons-right">:chevrons-right:</i> The **Limit Schema Mapping** dialog appears.
{% endstep %}

{% step %}
Limit schemas by moving them from the **Included** box to the **Not included** box. To do this, select the schema(s) you wish to limit, then click <img src="https://4121921244-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWCrP7Albs8DfJjIQxUxw%2Fuploads%2Fgit-blob-6a7c7a806e6f4e24a51783c46471c3a50bc1d56b%2Fdq-next-arrow-icon.png?alt=media" alt="" data-size="line">. You can also use the search fields to filter schemas.

{% hint style="info" %}
You can remove included schemas by selecting them from the **Included** box, then clicking <img src="https://4121921244-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWCrP7Albs8DfJjIQxUxw%2Fuploads%2Fgit-blob-0c37423f41105659535aad8c652febf274e81249%2Fdq-previous-arrow-icon.png?alt=media" alt="" data-size="line"> to move them to the **Not included** box.
{% endhint %}

![screenshot of the limit schema mapping dialog](https://4121921244-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWCrP7Albs8DfJjIQxUxw%2Fuploads%2Fgit-blob-16f259f97cac4188320af50bfaab7fb0dc212b39%2Fdq-limit-schemas.png?alt=media)
{% endstep %}

{% step %}
Click **Submit**.\ <i class="fa-chevrons-right">:chevrons-right:</i> The schemas you added to the "Not included" box in the Limit Schema Mapping dialog are no longer visible in the Explorer tree.
{% endstep %}
{% endstepper %}
