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:
  • Clone — Clone: Creates a copy of the selected database context. When clicked, a dialog prompts you to enter a new Context Id. All other settings are copied.
  • Delete — Delete: Deletes the selected database context.

Add a database context

To create a new database context, follow these steps:

  1. Click the Create New button.

  2. Enter valid values in the following fields:

    • Context ID
    • Driver Class Name
    • URL
    • User Name
    • Password
    • Method

  1. 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:

  1. Click the icon.

  2. Enter a valid and unique database context ID.

  3. Click Okay.

Delete a database context

To delete a database context, follow these steps:

  1. Click of the database context you wish to delete.

  2. 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 CriteriaDescription
ContainsReturns all database context that contain the specified keyword.
Does not containExcludes database context that contains the specified keyword.
EqualsReturns all the database context that match the specified keyword.
Does not equalReturns all the database context that does not match the specified keyword.
Begins withReturns all the database context whose names start with the specified keyword.
Ends withReturns all the database context whose names end with the specified keyword.
BlankReturns database context with no name.
Not blankReturns database context with a valid name.

You can also sort the database context in ascending or descending order by clicking on or .