-
Notifications
You must be signed in to change notification settings - Fork 83
temp rdbms
Icon |
|
---|---|
Use When |
Model based data needs to be staged and queried. |
Samples |
|
Description |
The Temp RDBMS component stages model based message data in a temporary database to be queried. This component is the same as the RDBMS Reader but instead of providing a data source, the data source is automatically created using the user provided Input Model. As model messages are received, they are loaded into the temporary database. If the Run When parameter is configured to 'PER UNIT OF WORK', only one database is created and the SQL expression is executed after all model based messages have been received. If the Run When parameter is configured to 'PER MESSAGE', each new model based message will initiate the creation of a new temporary database. The provided SQL will be executed after each message has been loaded into the database. Once the SQL has been executed against the temporary database, the database is cleaned up and removed from memory or the file system. |
Inbound Message Type |
Model Based Message |
Output Message Type |
Model Based Message |
Control Message Handling |
Input: When a unit of work boundary is received and 'Run When' is 'PER UNIT OF WORK' start the processing of this component or when any message other than a control is received and 'Run When' is not 'PER UNIT OF WORK'. Output: A single control message will be forwarded to downstream components once all Sql statements have been processed through this step. |
Name | Description |
---|---|
Whether to forward failed messages and continue processing. This is the name of a linked component to forward the failed messages to. |
|
Sql |
The sql query or script that will be executed for this reader. SQL hints are supported. |
Ddl |
Ddl desired applied to the temporary database prior to executing the SQL. |
In Memory Database |
Whether the temporary database should be created in memory or on the file system. |
Continue On Error |
Whether to continue processing records on a failure and count the error record in the ignore count |
Batch Mode |
Whether to execute the provided SQL as a transaction allowing rollback capability upon failure (assuming the RDBMS is not an auto commit system) |
Tip
|
If you would like to see the contents of the temporary h2 database, replace the Temp RDBMS SQL with the text "script to '/home/user/temp_rdbms_db.sql'". When this runs, the database contents will be exported to the local file system. After the export completes, Metl will correctly throw an error since the query did not return any results. This should be done for debugging only. To load the script into an empty h2 database, you can execute the following sql, "runscript from '/home/user/temp_rdbms_db.sql'". |