Skip to content

Database Connections

A Database Connection defines how QIE reaches an external database. Once defined, the same connection can be used by:

  • Mapping and condition scripts: mapping scripts look up reference data, write audit rows, or update related records during message processing; condition scripts can query a database to make routing decisions.
  • Database source nodes that drive a channel from the result set of a query.
  • Database destination nodes that insert or update rows when a message is processed.

A common pattern is to use a Database Connection from a mapping script to augment an incoming message, for example looking up patient demographics by MRN and merging them into the message before forwarding it to a downstream system.

QIE uses standard JDBC drivers and can connect to any DBMS for which a JDBC driver is available.

qie.doQuery loads the full result set into memory

qie.doQuery and pQuery.doQuery read every row of the result set into a CSV Message Model before the JDBC connection is closed, so scripts do not need to close the connection but the entire result set must fit in the JVM heap. For very large result sets (100k+ rows or wide messages), either narrow the query (add a WHERE clause, batch by ID range, or LIMIT/TOP) or drop down to qie.getDbConnection() and stream results with a native JDBC ResultSet.

QIE tracks the revision history of changes made to a database connection. Click the history icon on the panel menu bar to view who changed what and when. See Revision History for details.

Reference pages