Use the Warehouse node to interact with a database in the specified ODBC data source.
The Warehouse node is a specialized form of the Database node that stores the entire message, parts of the message, or both, in a table within the database. You define what is stored by creating mappings that use the data from the input message to identify the action that is required.
You can use the Warehouse node:
Use standard database query and mining techniques to retrieve messages that you have stored in the warehouse. (No explicit support is provided by WebSphere® Message Broker.)
You must have created or identified the following items:
The Warehouse node is contained in the Database drawer of the palette, and is represented in the workbench by the following icon:
When you have put an instance of the Warehouse node into a message flow, you can configure it. For more information, see Configuring a message flow node. The properties of the node are displayed in the Properties view. To display the properties of the node in the Properties dialog, right-click the node and click Properties. (If you double-click a Warehouse node, you open the New Message Map dialog box.) All mandatory properties for which you must enter a value (those that do not have a default value defined) are marked with an asterisk.
The terminals of the Warehouse node are described in the following table.
Terminal | Description |
---|---|
In | The input terminal that accepts a message for processing by the node. |
Failure | The output terminal to which the input message is propagated if a failure is detected during the computation. If you have selected Treat warnings as errors, the node propagates the message to this terminal even if the processing completes successfully. |
Out | The output terminal that outputs the message following the execution of the database statement. |
The following tables describe the node properties. The column headed M indicates whether the property is mandatory (marked with an asterisk if you must enter a value when no default is defined); the column headed C indicates whether the property is configurable (you can change the value when you add the message flow to the BAR file to deploy it).
The Warehouse node Description properties are described in the following table.
Property | M | C | Default | Description |
---|---|---|---|---|
Node name | No | No | Warehouse | The name of the node. |
Short description | No | No | A brief description of the node. | |
Long description | No | No | Text that describes the purpose of the node in the message flow. |
The Warehouse node Basic properties are described in the following table.
Property | M | C | Default | Description |
---|---|---|---|---|
Data source | No | Yes | The ODBC data source name of the database that
contains the tables to which you refer in the mappings that are associated
with this node (identified by the Field
mapping property). The name identifies the appropriate database
on the system on which this message flow is to run. The broker connects
to this database with user ID and password information that you have
specified on the mqsicreatebroker, mqsichangebroker, or mqsisetdbparms command.
|
|
Field mapping | Yes | No | Warehouse | The name of the mapping routine that contains
the statements that are to be executed against the database or the
message tree. By default, the name that is assigned to the mapping routine is identical to the name of the mappings file in which the routine is defined, and the default name for the file is the name of the message flow concatenated with the name of the node when you include it in the message flow (for example, MFlow1_Warehouse.msgmap for the first Warehouse node in message flow MFlow1). You cannot specify a value that includes spaces. If you click Browse next to this entry field, a dialog box is displayed that lists all available mapping routines that can be accessed by this node. Select the routine that you want and click OK; the routine name is set in Field mapping. To work with the mapping routine that is associated with this node, double-click the node, or right-click the node and select Open Mappings. If the mapping routine does not exist, it is created for you with the default name in the default file. If the file exists already, you can also open file flow_name_node_name.msgmap in the Broker Development view. The content of the mapping routine determines what is stored in the database, and in what format. You can, for example, store all or just a part of each message. You can also store the data as binary data, or store each field in the same format as it is in the message (for example, a character field in the message is stored as character in the database). A mapping routine is specific to the type of node with which it is associated; you cannot use a mapping routine that you have developed for a Warehouse node with any other node that uses mappings (for example, a DataInsert node). If you create a mapping routine, you cannot call it from any other mapping routine, although you can call it from an ESQL routine. For more information about working with mapping files, and defining their content, see Developing message mappings. |
Transaction | Yes | No | Automatic | The transaction mode for the node. Select the
value that you require:
|
Treat warnings as errors | Yes | No | Cleared | For database warning messages to be treated
as errors, and the node to propagate the output message to the Failure
terminal, select Treat warnings as
errors. The check box is cleared by default. When you select the check box, the node handles all positive return codes from the database as errors and generates exceptions in the same way as it does for the negative, or more serious, errors. If you do not select the check box, the node treats warnings as typical return codes, and does not raise any exceptions. The most significant warning raised is not found, which can be handled as a typical return code safely in most circumstances. |
Throw exception on database error | Yes | No | Selected | For the broker to generate an exception when
a database error is detected, select Throw
exception on database errors. The check box is selected by
default. If you clear the check box, you must handle the error in the message flow to ensure the integrity of the broker and the database; the error is ignored if you do not handle it through your own processing, because you have chosen not to invoke the default error handling by the broker; for example, you can connect the Failure terminal to an error processing subroutine. |