database egress connector

Database Egress Connector

Version: 17.07

Supported Since: 17.01

What is Database Egress Connector?

The Database Egress connector can be used to insert, update and delete data to a SQL database. The SQL query is pre configured and the parameters for the SQL query can be passed through a configuration file. Data which needs to be inserted to the database can be extracted from for resources and they are;

  • Message Payload (XML Payloads only)

  • Transport Header

  • Scope Variable

  • Values hard coded to the mapping file

Database Egress connector can be used with relational SQL database system such as Oracle, MS SQL Server and MySQL.

In order to use the Database Egress Connector, you must first select the Database Connector dependency from the connector list when you are creating an empty Ultra project. If you have already created a project, you can add the Database Connector dependency via Component Registry. From Tools menu, select Ultra Studio → Component Registry and from the Connectors list, select the Database Connector dependency.
database egress connector 4

Out Ports

On Exception

The message will be emitted from this out port, if an error occurs while performing Database operation.

Side Ports

Connector Operation

This port is used to connect operational elements to the Egress Connector. By-default, user does not have to connect any operational element and the default connector operation will be used.

Parameters

* marked fields are mandatory

Data Source *

Basic

Resource bean for the database connection to be used by the connector.

SQL query *

Basic

SQL query with parameters. Ex: insert into table_1 (column_1, column_2, column_3, column_4) values (@{parameter_1}, @{parameter_2}, @{parameter_3}, @{parameter_4})

Mapping file

Basic

File path to the DSON configuration mapping file.

Egress Timeout

Advanced

Timeout in milliseconds after which the egress message timeouts

Weight

Fail-Over

Weight of the Egress endpoint when used with a Load Balancer

Sample Use Case

Prerequisite

First open the project.xpml file of the project and right click on it (on the XML content of the file). From the context menu, select Resource Template as shown in below figure.

database ingress connector 5

After that from the shown dialog box, select Database template.

database ingress connector 6

Next you need to specify the required parameters as shown below. It is mandatory to specify a bean prefix and for that you can specify any value.

database ingress connector 7
Setting up the connector

Now let’s configure a Database Egress Connector to insert data to a database table with four columns. For better understandability, let’s extract data from all 4 possible resources.

Suppose there is a database table named as table_1 with 4 columns named as column_1, column_2, column_3, column_4. The the sample integration flow will be as follows.