DB context
Overview
A Database Context (DB Context) defines a named database connection that DOH uses to access an external database. It enables a source and target to reside on different databases, allowing DOH to map and transfer data between them.
A DB Context contains the connection details, such as the database URL, username, and password, for an external database and is referenced by name when defining tables and source queries.
Instead of storing connection details each time you define a table or source, you create a DB Context once and then reference it by name. DOH uses the DB Context to connect to the database and automatically retrieve table or query metadata, such as column names.
DB Contexts make it possible to:
- Read data from an external database.
- Write data to an external database.
- Map data between different databases.
- Use different databases for the source and target of a data transfer.
For example, if you have two PostgreSQL databases named PG1 and PG2, you can create a DB Context for each one. A source can use PG1, while the target uses PG2, allowing DOH to copy data between the two databases.
To access the Database context page, navigate to Settings > DB Context.

| Field | Description |
|---|---|
| Sequence | Displays the sequence number of the database. |
| Context Id | Unique Oracle identifier for the database context. |
| Driver Class Name | JDBC driver class used to connect to the database. |
| URL | JDBC connection string used to connect to the database. |
| Username | Username used to connect to the database. |
| Password | Masked password used to connect to the database. |
| Action |
Displays the following icons:
|
Add a database context
To create a new database context, follow these steps:
-
Click the Create New button.

-
Enter valid values in the following fields:

- Context ID
- Driver Class Name
- URL
- User Name
- Password
- Method
- Click Save.
Modify a database context
The Database Context module allows you to update the details of an existing database context. To make modifications, select the context ID from the list and change the values in the fields as needed.

Clone a database context
The Database context module enables you to clone an existing database context. When you clone a database context, all metadata is duplicated except the Context Id. To clone a database context, follow these steps:
-
Click the
icon. -
Enter a valid and unique database context ID.

-
Click Okay.
Delete a database context
To delete a database context, follow these steps:
-
Click
of the database context you wish to delete.

-
Click Save. Once saved, the role in the red highlight will be deleted.

Filter and Sort
The Database Context includes a Filter feature that allows you to filter the list of database context by providing a keyword or the full name of the database context. The database context that matches the provided keyword or name will be displayed on the screen.
To filter the database context, click
in the colunmn title.

| Filter Criteria | Description |
|---|---|
| Contains | Returns all database context that contain the specified keyword. |
| Does not contain | Excludes database context that contains the specified keyword. |
| Equals | Returns all the database context that match the specified keyword. |
| Does not equal | Returns all the database context that does not match the specified keyword. |
| Begins with | Returns all the database context whose names start with the specified keyword. |
| Ends with | Returns all the database context whose names end with the specified keyword. |
| Blank | Returns database context with no name. |
| Not blank | Returns database context with a valid name. |
You can also sort the database context in ascending or descending order by clicking on
or
.