Database
With the Database function, you can create, delete, and update data in a database as a final step of your data processing. It is a forwarder function and can be used to create and update audit records in a database, for example.
Note!
The Database function is not transaction safe, which means that if a stream fails, any updates made to the database will not be rolled back. See Transaction safety for more information about transaction safety.
Configure the Database forwarder function by entering the required credentials in the following sections:
Database configuration
The information required to access the database.
Configuration Setting | Description |
|---|---|
Database type | Select the type of database that you want to push your data to. The available options are:
|
Database name | Specify the name of the database you want to push the data to. |
Hostname or IP address | Specify the hostname or the IP Address of the database. Note! The IP address must be a public IP address for Usage Engine to reach it. See Database | Secure database connectivity below for information on how to set this up in a secure way. |
Port | Specify the port used by the database. When a Database Type is selected, the default port number is specified for each type of database. The default port numbers are:
|
Encryption type | Note! The Encryption type dropdown is displayed only if the Oracle option is selected as the Database type. Select the Encryption type that matches the configuration on your database server from the dropdown list: Oracle Encryption type dropdown options Note! The Transport Layer Security option is selected by default.
|
The configuration of TLS support for different database types are shown in the table below:
Database Type | TLS Configuration |
|---|---|
Oracle | For Oracle, TLS is enabled by default. Unencrypted connections are not permitted. In addition, Native Network Encryption is also supported. |
MS SQL | For MS SQL, TLS is required and always enabled. Unencrypted connections are not permitted. |
PostgreSQL | For PostgreSQL, the |
The authentication information is required to log in to the database.
Configuration setting | Description |
|---|---|
Username | Specify the username for the authentication. |
Password | Specify the password for the authentication. |
SQL statement
Specify the statement that you can use to push data to the selected database.
Note!
The Database function supports Variable insertion when writing SQL statements.
Example - Using INSERT INTO
INSERT INTO table_name (column1, column2, column3, ...)
VALUES (value1, value2, value3, ...);Example - Using UPDATE
UPDATE table_name
SET column1 = value1, column2 = value2, ...
WHERE condition;Example - Using DELETE
DELETE FROM table_name WHERE condition;Example - Interpolation
DELETE FROM table_name WHERE id = ${payload.id} AND name = ${payload.name};Secure database connectivity
If you want Usage Engine to connect to a database, it must have a public IP address, which allows you to reach it directly from the internet.
To ensure a secure connection using a public IP address, the following strategies are recommended:
Strong authentication process
Encryption of communication
Whitelisting of trusted IP addresses
While the authentication process is the responsibility of the DBA, all communication between Usage Engine and the database can be TLS encrypted. Usage Engine will connect to the Database from one of the following IP addresses which must be whitelisted:
EU:
63.33.245.80,
63.35.38.190,
63.35.102.205
US:
44.198.146.136
52.44.235.9
54.146.237.141