# Adding a data source

Add a data source that contains raw data that you want to process in the Pentaho Data Mastering application.

You must have **admin** privileges to add a data source.

Perform the following steps to add a data source:

1. &#x20;On the left navigation menu, click **Master Data**. The **Master Data** page opens.
2. In the **Resources** card, click **Add Data Source**.

   The Create Data Source page opens.
3. In the **Data Source Name** box, specify the name of the data source.
4. In the Database Type list, select the database that you want to source data from.
5. Update the input fields for the selected database.

   For reference, review the following examples of input fields for different databases:

| Field                      | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Data source name\***     | Name of the data source.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| **Database type\***        | Type of the database.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **Driver provided**        | Not required for Oracle databases.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| **Configuration method\*** | <p>Method of configuration. Supported values are:</p><ul><li>URI</li><li>Credentials</li><li>SSL The configuration method that you select determines whether some fields on the page are shown.</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| **Database name\***        | Name of the database.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **Username\***             | Name of the database user.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| **Password\***             | Password to access the database.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| **Service URI\***          | Service URI details. The Service URI field is visible only when you select **URI** as the configuration method. For example: `db://username:password@127.0.0.1:1234/root`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| **Host\***                 | Host name of the server. The **Host** field is visible only when you select **Credentials** as the configuration method. For example: `localhost`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **Port\***                 | Port number to be used for connection. The **Port** field is visible only when you select **Credentials** as the configuration method. For example: `5432`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| **SSL Type**               | <p>Type of SSL to use. The <strong>SSL Type</strong> field is visible only when <strong>SSL</strong> is selected as the configuration method. Supported SSL types are:</p><ul><li><strong>Encryption Only</strong></li><li><strong>Encryption with Server and Client Authentication</strong> The following fields are displayed for both SSL types:</li><li><strong>Trust Source Type\*</strong> - Type of trust source</li><li><strong>Trust Source Location\*</strong> - Location of trust source</li><li><strong>Trust Source Password\*</strong>- Password of trust source</li><li><strong>Cipher Suite\*</strong> - Cipher suite details</li><li><strong>Server’s Distinguished Name\*</strong> - Distinguished name of server The following fields are displayed only when you select the <strong>Encryption with Server and Client Authentication SSL</strong> type:</li><li><strong>Key Store Type\*</strong> - Type of key store.</li><li><strong>Key Store Location\*</strong> - Location of key store.</li><li><strong>Key Store Password\*</strong> - Password of key store.</li></ul> |
| **Description**            | Description of the data source.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| \* Mandatory               |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |

| Field                      | Description                                                                                                                                                                                       |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Data source name\***     | Name of the data source.                                                                                                                                                                          |
| **Database type\***        | Type of database.                                                                                                                                                                                 |
| **Driver provided**        | Not required for PostgreSQL databases.                                                                                                                                                            |
| **Configuration method\*** | <p>Method of configuration. Supported values are:</p><ul><li>URI</li><li>Credentials The configuration method that you select determines whether some fields on the page are displayed.</li></ul> |
| **Database name\***        | Name of the database.                                                                                                                                                                             |
| **Username\***             | Name of the database user.                                                                                                                                                                        |
| **Password\***             | Password to access the database.                                                                                                                                                                  |
| **Service URI\***          | Service URI details. The **Service URI** field is visible only when you select **URI** as the configuration method. For example: `db://username:password@127.0.0.1:1234/root`                     |
| **Host\***                 | Host name of the server. The **Host** field is visible only when you select **Credentials** as the configuration method. For example: `localhost`                                                 |
| **Port\***                 | Port number to be used for connection. The **Port** field is visible only when you select **Credentials** as the configuration method. For example: `5432`                                        |
| **Description**            | Description of the data source.                                                                                                                                                                   |
| \* Mandatory               |                                                                                                                                                                                                   |

| Field                      | Description                                                                                                |
| -------------------------- | ---------------------------------------------------------------------------------------------------------- |
| **Data source name\***     | Name of the data source.                                                                                   |
| **Database type\***        | Type of database.                                                                                          |
| **Configuration method\*** | Method of configuration. **Credentials** is the only configuration method that is supported for Snowflake. |
| **Database name\***        | Name of the database.                                                                                      |
| **Username\***             | Name of the database user.                                                                                 |
| **Password\***             | Password to access the database.                                                                           |
| **Host\***                 | Host name of the server. For example: `localhost`                                                          |
| **Port\***                 | Port number to be used for connection. For example: `5432`                                                 |
| **Description**            | Description of the data source.                                                                            |
| \* Mandatory               |                                                                                                            |

| Field                      | Description                                                                                                                                                                                |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Data source name\***     | Name of the data source.                                                                                                                                                                   |
| **Database type\***        | Type of database.                                                                                                                                                                          |
| **Connection Type**        | Connection type for the database.                                                                                                                                                          |
| **Configuration method\*** | <p>Method of configuration. Supported values are:- URI</p><ul><li>Credentials The configuration method that you select determines whether some fields on the page are displayed.</li></ul> |
| **Database name\***        | Name of the database.                                                                                                                                                                      |
| **Username\***             | Name of the database user.                                                                                                                                                                 |
| **Password\***             | Password to access the database.                                                                                                                                                           |
| **Service URI\***          | Service URI details. The **Service URI** field is visible only when you select **URI** as the configuration method. For example: `db://username:password@127.0.0.1:1234/root`              |
| **Host\***                 | Host name of the server. The **Host** field is visible only when you select **Credentials** as the configuration method. For example: `localhost`                                          |
| **Port\***                 | Port number to be used for connection. The **Port** field is visible only when you select **Credentials** as the configuration method. For example: `5432`                                 |
| **Description**            | Description of the data source.                                                                                                                                                            |
| \* Mandatory               |                                                                                                                                                                                            |

| Field                      | Description                                                                                                                                                |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Data source name\***     | Name of the data source.                                                                                                                                   |
| **Database type\***        | Type of database.                                                                                                                                          |
| **Configuration method\*** | Method of configuration. **Credentials** is the only configuration method that is supported for MySQL.                                                     |
| **Database name\***        | Name of the database.                                                                                                                                      |
| **Username\***             | Name of the database user.                                                                                                                                 |
| **Password\***             | Password to access the database.                                                                                                                           |
| **Host\***                 | Host name of the server. The **Host** field is visible only when you select **Credentials** as the configuration method. For example: `localhost`          |
| **Port\***                 | Port number to be used for connection. The **Port** field is visible only when you select **Credentials** as the configuration method. For example: `5432` |
| **Description**            | Description of the data source.                                                                                                                            |
| \* Mandatory               |                                                                                                                                                            |

6\. Click **Test Connection** to test the database connectivity. If the data source connection information that you entered is valid, a confirmation message is displayed. If the data source connection information is not valid, an error notification is displayed. A data source is created only when the database connectivity test is successful.

7. (Optional) Specify the description of the data source in the **Description** box.
8. Click **Create Data Source**.

   A confirmation message is displayed at the top of the page and the new data source is added in the data source table.

   **Tip:** To add multiple data sources at one time, see [Adding data sources in bulk](/pentaho-data-mastering/sourcing-data/adding-a-data-source/adding-data-sources-in-bulk.md).


---

# 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.pentaho.com/pentaho-data-mastering/sourcing-data/adding-a-data-source.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.
