Database
Read new orders from, or write results to, a table - PostgreSQL, SQL Server, Oracle or MySQL.
Data & cloud↓ Inbound↑ OutboundDATABASEcamel-sqlJDBC - Java Database Connectivity - the address format used to reach a database
See the Glossary for every term.
For PostgreSQL, Test connection signs in and runs SELECT 1. For SQL Server, Oracle and MySQL it only checks that the host and port answer, because their drivers are not installed yet (see Stage 2).
Inbound: the SELECT that returns new rows. Outbound: the INSERT, with :#field placeholders. The worked example uses a read-only user.
Worked example
LIS order table (SQL Server) · Inbound · JSON · Test passes on any engine: No - placeholder values
Placeholder database on example.com - replace with the partner's JDBC URL, a read-only user and password.
{
"direction": "Inbound",
"format": "JSON",
"settings": {
"jdbcUrl": "jdbc:sqlserver://lis-db.example.com:1433;databaseName=orders",
"username": "reader",
"query": "SELECT * FROM new_orders WHERE sent = 0",
"pollSeconds": "60"
}
}
The addresses above are placeholders on example.com. Replace them with your partner's real details before running Test connection.
This is what the console's Fill example button enters. Secrets are never part of an example. Every setting is explained below.
Settings
Required fields are marked Yes. Fields marked 🔒 (password) are stored encrypted and never sent back to the browser - the console only shows Set / Not set. A field marked inbound only or outbound only appears just for that direction.
| Setting | Type | Required | Default | What to enter |
|---|---|---|---|---|
jdbcUrlJDBC URL | text | Yes | jdbc:postgresql:// | e.g. jdbc:postgresql://host:5432/lis or jdbc:sqlserver://host:1433;databaseName=lis |
usernameUsername | text | Yes | — | Required: a database account that can read (in) or write (out) the table, e.g. lis_reader. |
passwordPassword | password | No | — | 🔒 secret. That account's password. Stored encrypted. |
queryQuery | textarea | No | — | Inbound: the SELECT that returns new rows. Outbound: the INSERT, with :#field placeholders. |
pollSecondsPoll every (seconds) | number | No | 60 | inbound only. How often to run the query, e.g. 60 (seconds). |
What "Test connection" checks
PostgreSQL: signs in and runs SELECT 1. Others: the host and port answer (their drivers come in Stage 2).
Test connection is read-only and says how far it got: verified, reached, checked or failed. See Testing a connection, and Troubleshooting if it fails.