Developing Apama Applications > Developing Apama Applications in Event Modeler > Using Standard Blocks > Database functionality—storage and retrieval > ADBC Storage v1.0
ADBC Storage v1.0
The ADBC (Apama Database Connector) Storage block uses the ADBC adapter to store data in a database. To make this block available to your scenario, add the ADBC for JDBC or ADBC for ODBC bundle to your project. Adding one of these bundles to your project automatically adds the ADBC Common bundle, which contains the ADBC blocks.
Description
The ADBC adapter is a standard adapter provided with Apama. It provides general database storage and retrieval (query) and also event capture and playback. The ADBC adapter supports both standard SQL and specialized databases. In particular, the adapter supports ODBC and JDBC. This support provides access to most commercial and open source SQL databases. ADBC provides a superset of the functionality that was available in the ODBC and JDBC Apama standard adapters.
The Storage block can also be used to perform standard SQL operations such as Delete, Update, and Rollback. To carry out an SQL operation, the value of the statement parameter (described below) should be set to the operation you want to carry out.
Parameters
Parameter
Description
service identifier
The name of the service to use.
database
The data source name of the database to connect to.
user name
The username to use when connecting to the database.
password
The password to use when connecting to the database (will be readable on screen).
table
The name of the table to store data in.
fields
A comma-separated list of field names.
values
A comma-separated list of values that will be placed in the fields list.
statement
If this is not empty, the correlator uses this as the storage command instead of using the fields and values parameters. This parameter can be set to an SQL operation such as UPDATE, DELETE, or ROLLBACK.
autocommit
The auto commit mode to use. The default is an empty string. Specify one of the following:
*OFF indicates no auto commit mode.
*ADBC indicates the ADBC adapter auto commit mode based on a time period.
*DATA_SOURCE indicates a data source specific auto commit mode. This might not be available for all data sources.
acknowledge store
Boolean that indicates whether the data source returns an acknowledgement to indicate success or failure for each store performed. True indicates that the data source always sends an acknowledgement. False indicates that the data source returns only store errors. The default is true. The success acknowledgement along with the current auto commit setting determine whether the data has been stored. A commit operation might also be needed.
unique connection
Boolean that indicates whether or not to create a new database connection. True indicates that you want the block to always create a new connection. False indicates that the block can use an existing connection. The default is false.
final store
If true indicates this will be the last store operation performed. Default value is false.If true the output feed field committed.final store complete will be set to true after the store operation completes (success or failure).
Operations
Operation
Description
connect
Establish a connection to the database.
store
Store in the database the data held in the block’s parameters.
commit
Commit any data sent to the database.
rollback
Rollback uncommitted changes to the database.
reset
Resets the output feed.
disconnect
Close the database connection.
Input feeds
This block has no input feeds.
Output feeds
Feed
Fields
Description
result
success
true if the last update to the database was successful.
message
A message from the last database update operation.
connected
true if connected to the database.
committed
status
true if the last commit operation succeeds, else false.
final store complete
true when the store operation with the final store parameter set to true has completed.
rollback
status
true if the last rollback operation succeeded; otherwise false.
Copyright © 2013 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.