---
description: Set up accounts and connections
---

# Manage datasources

{% hint style="warning" %}
The procedures on this page require a Workspace Admin role.
{% endhint %}

To monitor your data quality, you connect to each datasource you want to monitor. To make that possible, you'll need a Lightup user account for each of them.&#x20;

Some datasources use existing database connection APIs (such as ODBC/JDBC), and others have proprietary APIs. The details of connecting to a datasource vary by platform.

{% hint style="info" %}
A datasource typically requires an account for Lightup in the target data asset (such as a database). Lightup supports numerous data platforms. Find steps on [the corresponding subpage](#list-of-connectors) to prepare the _lightup\_user_ account before you connect to the datasource.
{% endhint %}

## Connect a datasource

1. In the left pane, open a workspace menu and select **Datasources.** Then, in the main form select **+**.\
   \
   ![](https://3772145110-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7hLPjNTyFMw1VTOP6ZnD%2Fuploads%2F6AgWuRfAtQuCP5BgNZeT%2Fnew-datasource.png?alt=media\&token=55c11fa1-c64d-4757-9224-99f871a9fa6d)\

2. Enter a **Datasource Name**, then select a **Connector Type**.\
   \
   ![](https://3772145110-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7hLPjNTyFMw1VTOP6ZnD%2Fuploads%2F6KWLZJ4DXqfUpm8nlxBK%2FDatasources-listbox.png?alt=media\&token=5eebcfb4-0cc4-4589-97c6-8fa19fa73729)
3. Provide connection information for the connector you chose. For details, [see the corresponding subpage](#list-of-connectors).
4. After entering the required settings and any optional settings that apply, below the **Connector Setting** section select **Test Connection**.
5. After a successful connection test, select **Save**. &#x20;
6. Your new datasource appears in the list of available datasources. By default, these are listed in alphabetical order, so you might have to scroll or change the sort order to see your new datasource.\
   \
   &#x20;![](https://3772145110-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7hLPjNTyFMw1VTOP6ZnD%2Fuploads%2FxTJAtjFoT3jwGAp2xxyK%2Flist-available-datasources-by-title.png?alt=media\&token=696200a5-7efb-44f5-abd8-10f65b386d3d)

### Connector subpages <a href="#list-of-connectors" id="list-of-connectors"></a>

* [Athena](manage-datasources/connect-to-athena)
* [BigQuery](manage-datasources/connect-to-bigquery)
* [Databricks](manage-datasources/connect-to-databricks)
* [Hive](manage-datasources/connect-to-hive)
* [Microsoft SQL](manage-datasources/connect-to-microsoft-sql)
* [Oracle](manage-datasources/connect-to-oracle)
* [Postgres](manage-datasources/connect-to-postgres)
* [Redshift](manage-datasources/connect-to-redshift)
* [Snowflake](manage-datasources/connect-to-snowflake)

## Set up query governance

{% hint style="info" %}
Not all query governance features are available for every data source connector. You might not see the feature, or it might appear but not be active. We're enabling query governance for more connectors. Look to [the connector subpages](#list-of-connectors) for current information about query governance.
{% endhint %}

### Open the Query Governance settings <a href="#open-the-query-governance-settings" id="open-the-query-governance-settings"></a>

In the left nav, on your workspace menu, select **Query Governance**. The main form displays Query Governance settings on the left, and a view of query performance history on the right.\


<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2qGS6Bkhof6EfaRVuGdv%2Fuploads%2FQTsK2h4C0f0RtwU8rkER%2Fquery-gov.png?alt=media&#x26;token=df44ead4-e402-4bab-ae8b-6ca9edcdac90" alt="Query Goverance settings for a datasource"><figcaption></figcaption></figure>

### Set query governance for a datasource <a href="#set-query-governance-for-a-datasource" id="set-query-governance-for-a-datasource"></a>

1. Open the Query Governance settings.
2. Under **Datasources**, choose a datasource to govern.
3. Set your governance settings:

* **Query timeout** - use the toggle to turn this governor on and off. If **Query timeout** is on, any Lightup query (the basis of metrics) that hasn't returned a value within the interval specified by **Terminate after** (number with time unit) stops running (fails)
* **Query date range limit**- use the toggle to turn this governor on and off. If **Query date range limit** is on, any Lightup query (the basis of metrics) that attempts to summarize data over a period that's longer that what's specified by **Limit range to** (number with time unit) is terminated (canceled).

### Review q**uery history**&#x20;

The Query History view shows totals for: queries **Completed**, **Failed**, **Cancelled**, and **Processing**. This information helps you decide when to turn on/off query governors on active datasources. For example, if a lot of Lightup queries are failing, the Query timeout might be set too low.​

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2qGS6Bkhof6EfaRVuGdv%2Fuploads%2FvGCxO8jhZ46ProN9xr67%2Fquery-history-view.png?alt=media&#x26;token=2dac22b1-ab94-441e-94fb-e6aa18fe5ab0" alt="24 hour Query History for a data asset"><figcaption><p>Query history for a data asset</p></figcaption></figure>

