4.2.5.31. Database Gateway OUT
The database gateway connects to a database and pulls rows out (gateway IN) of a table and converts them to an XML file.
Currently, we support Oracle connections (using JDBC - so no current limitations on DB versions) and PostgreSQL connections. We can (and are interested in) setting up additional connection types at a limited cost. Let us know if there’s any client interest.
The connection information is common for both IN and OUT gateways:
- host,
- username,
- password,
- database name,
- service id (for oracle only),and
- SSL (check if you wish to use SSL).
You will additionally have to specify which table you wish to fetch content from, the columns you wish to retrieve (optionally) and what to do with the rows you’ve fetched:
- delete - will rely on table’s primary key to delete the exact row which was fetched.
- update - will fetch only rows where the ‘status column’ has the value that indicates row is in ‘todo’ and will update it to the ‘done’ value once the row has been fetched.
Both gateways build and understand a very basic XML format that looks like this:
<Message>
<table1>
<col1>my first value</col1>
<col2>my second column value</col2>
</table1>
</Message>
As an example, if I were to send this in a database gateway out it would try to execute:
INSERT INTO table1 (col1, col2) VALUES ('my first value','my second column value')