# Send data to your databases

{% hint style="info" %}
See the changelog of this Data sink type [here](/data-sinks/relational-databases-data-sink.md).
{% endhint %}

## Overview

Onum supports integration with your relational databases.

A relational database is a type of database that organizes data into tables with predefined relationships between them, making it easier to manage and access information.

## Onum Setup

{% stepper %}
{% step %}
Log in to your Onum tenant and click **Data Sinks> New Data sink**.
{% endstep %}

{% step %}
Double-click the **Relational Databases** Sink.
{% endstep %}

{% step %}
Enter a **Name** for the new Data Sink. Optionally, add a **Description** and some **Tags** to identify the Sink.
{% endstep %}

{% step %}
Decide whether or not to include this Data sink info in the metrics and graphs of the [**Home**](/the-workspace/home.md) area.
{% endstep %}

{% step %}
**Database Type**<mark style="color:red;">**\***</mark>&#x20;

Onum supports four types of databases:

* **MySql**
* **PostgresSql**
* **Oracle**
* **SqlServer**
  {% endstep %}

{% step %}
Specify where in this database to connect to and who to connect.

* **User**<mark style="color:red;">**\***</mark>
* Add the **Password**<mark style="color:red;">**\***</mark> from your list of [Secrets](/administration/global-settings/organization-settings/secrets-management.md) or create one.
* The **Host**<mark style="color:red;">**\***</mark> URL for the database.
* The **Port**<mark style="color:red;">**\***</mark> to connect to.
* The name of the database you wish to store the results in.
  {% endstep %}

{% step %}
In the [Secrets](/administration/global-settings/organization-settings/secrets-management.md) area, **New secret** to create a new one:

* Give the secret a **Name**.
* Turn off the **Expiration date** option.
* Click **Add new value** and paste the corresponding value.
* Click **Save**.

<figure><picture><source srcset="/files/NeeWsSQzoChVxRIY76Nt" media="(prefers-color-scheme: dark)"><img src="/files/1oTccyPmgZJ1laY7IhZH" alt=""></picture><figcaption></figcaption></figure>

{% hint style="info" %}
Learn more about secrets in Onum in [this article](/administration/global-settings/organization-settings/secrets-management.md).
{% endhint %}

You can now select the created secrets in the configuration.
{% endstep %}

{% step %}
Specify the **Maximum requests per second**<mark style="color:red;">**\***</mark>. The minimum value is `1`, and the maximum value is `100`.
{% endstep %}

{% step %}
**Connection Pool Configuration**

* **Max Open Connections -** Enter a maximum for how many connections may be open at once (`0`-unlimited).
* **Max Idle Connections -** Enter a maximum for how many connections may be idle at once (`0`-unlimited).
* **Connection** **Max Idle Time -** Enter how many seconds a connection may be idle for (`0`-unlimited).
* **Connection** **Max Lifetime -** Add a limit to the connection lifetime (`0`-unlimited).
  {% endstep %}
  {% endstepper %}

Click **Finish** when complete. Your new Data sink will appear in the **Data sinks** area list.

## Pipeline configuration <a href="#output-configuration" id="output-configuration"></a>

When it comes to using this Data sink in a [Pipeline](https://docs.onum.com/the-workspace/pipelines), you must configure the following output parameters. To do it, simply click the Data sink on the canvas and select **Configuration**.

### Output configuration

#### SQL sentence to execute

<table><thead><tr><th width="169.94921875">Parameters</th><th>Description</th></tr></thead><tbody><tr><td><strong>Table</strong><mark style="color:red;"><strong>*</strong></mark></td><td>Enter the name of the table you'll use to build the SQL sentence to be executed.</td></tr></tbody></table>

#### **Column/Value pairs**

Define the table to be sent to your database. Click **Add Element** to add as many pairs as needed.

<table><thead><tr><th width="170.41796875">Parameters</th><th>Description</th></tr></thead><tbody><tr><td><strong>Column</strong><mark style="color:red;"><strong>*</strong></mark></td><td>Enter a name for the column that will appear in your database.</td></tr><tr><td><strong>Value</strong><mark style="color:red;"><strong>*</strong></mark></td><td>Select the incoming field that contains the value to sent.</td></tr></tbody></table>

Click **Save** to save your configuration.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.onum.com/the-workspace/data-sinks/data-sink-integrations/send-data-to-your-databases.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
