Operator EventStoreSink

IBMStreams streamsx.eventstore Toolkit > com.ibm.streamsx.eventstore 2.5.0.beta > com.ibm.streamsx.eventstore > EventStoreSink

The EventStoreSink inserts IBM Streams tuples in to an IBM Db2 Event Store table.

This operator supports consistent region and optional types.

Data Types
Behavior in a consistent region
Configure connection with application configuration
Connection information
Example

Summary

Ports
This operator has 1 input port and 1 output port.
Windowing
This operator does not accept any windowing configurations.
Parameters
This operator supports 21 parameters.

Required: tableName

Optional: batchSize, configObject, connectionString, databaseName, eventStorePassword, eventStoreUser, frontEndConnectionFlag, keyStore, keyStorePassword, maxNumActiveBatches, partitioningKey, pluginFlag, pluginName, preserveOrder, primaryKey, schemaName, sslConnection, sslDebug, trustStore, trustStorePassword

Metrics
This operator reports 7 metrics.

Properties

Implementation
Java

Input Ports

Ports (0)

Port that ingests tuples which are inserted into Db2 Event Store database table. The tuple field types and positions in the IBM Streams schema must match the field names in your IBM Db2 Event Store table schema exactly.Incoming tuples are processed in batches, where the processing will be to send rows to IBM Db2 Event Store, and is driven by the size of the batch. A batch is processed when it reaches at least the batch size. If you define the input Stream with attributes using optional type, then this operator writes 'null' to a nullable column in a table in case the optional attribute has no value set.

Properties

Output Ports

Assignments
Java operators do not support output assignments.
Ports (0)

Port that optionally produces tuple insert results. This output port is intended to output the information on whether a tuple was successful or not when it was inserted into the database. EventStoreSink looks for a Boolean field called _Inserted_ in the output stream. EventStoreSink sets the field to true if the data was successfully inserted and false if the insert failed. Besides the _Inserted_ column, the output will include the original tuple attributes (from input stream) that was processed by the EventStoreSink operator.

Properties

Parameters

This operator supports 21 parameters.

Required: tableName

Optional: batchSize, configObject, connectionString, databaseName, eventStorePassword, eventStoreUser, frontEndConnectionFlag, keyStore, keyStorePassword, maxNumActiveBatches, partitioningKey, pluginFlag, pluginName, preserveOrder, primaryKey, schemaName, sslConnection, sslDebug, trustStore, trustStorePassword

batchSize

Specifies the batch size for the number of rows that will be batched in the operator before the batch is inserted into IBM Db2 Event Store by using the batchInsertAsync method. If you do not specify this parameter, the batchSize defaults to the estimated number of rows that could fit into an 8K memory page.

Properties
configObject

Specify the application configuration name. An application configuration can be created in the Streams Console or using the streamtool mkappconfig ... <configObject name>. If you specify parameter values (properties) in the configuration object, they override the values that are configured for the EventStoreSink operator. Supported properties are: connectionString, databaseName, eventStoreUser, eventStorePassword, keyStorePassword, trustStorePassword, pluginName, pluginFlag, sslConnection

Properties
connectionString

Specifies the IBM Db2 Event Store connection endpoint as a set of IP addresses and ports: <IP>:<jdbc-port>;<IP>:<port>. Separate multiple entries with a comma.

Properties
databaseName

The name of an existing IBM Db2 Event Store database in order to connect.

Properties
eventStorePassword

Password for the IBM Db2 Event Store User in order to connect.

Properties
eventStoreUser

Name of the IBM Db2 Event Store User in order to connect.

Properties
frontEndConnectionFlag

Set to true to connect through a Secure Gateway for Event Store

Properties
keyStore

This parameter specifies the path to the keyStore file for the SSL connection. If a relative path is specified, the path is relative to the application directory.

Properties
keyStorePassword

This parameter specifies the password for the keyStore given by the keyStore parameter.

Properties
maxNumActiveBatches

Set the maximum number of active batches.

Properties
partitioningKey

Partitioning key for the table. A string of attribute names separated by commas. The order of the attribute names defines the order of entries in the sharding key for the IBM Db2 Event Store table. The attribute names are the names of the fields in the stream. The partitioningKey parameter is used only if the table does not yet exist in the IBM Db2 Event Store database. If you do not specify this parameter or if the key string is empty, the key defaults to making the first column in the stream as the shard key. For example, "col1, col2, col3"

Properties
pluginFlag

This parameter specifies whether plug-in is enabled for the SSL connection. The default value is true.

Properties
pluginName

This parameter specifies the plug-in name for the SSL connection. The default value is IBMIAMauth.

Properties
preserveOrder

Preserve order if true

Properties
primaryKey

Primary key for the table. A string of attribute names separated by commas. The order of the attribute names defines the order of entries in the primary key for the IBM Db2 Event Store table. The attribute names are the names of the fields in the stream. The primaryKey parameter is used only, if the table does not yet exist in the IBM Db2 Event Store database. If you do not specify this parameter, the resulting table has an empty primary key.

Properties
schemaName

The name of the table schema name of the table into which to insert data. If not used the default will be the user id.

Properties
sslConnection

This optional parameter specifies whether an SSL connection should be made to the database. The default value is true.

Properties
sslDebug

If SSL/TLS protocol debugging is enabled, all protocol data and information is logged to the console. Use this to debug TLS connection problems. The default is 'false'. This parameter can be overwritten by the application configuration.

Properties
tableName

The name of the table into which you want to insert data from the IBM Streams application. If the table does not exist, the table is automatically created in IBM Db2 Event Store.

Properties
trustStore

This parameter specifies the path to the trustStore file for the SSL connection. If a relative path is specified, the path is relative to the application directory.

Properties
trustStorePassword

This parameter specifies the password for the trustStore given by the trustStore parameter.

Properties

Metrics

NumBatchesPerInsert - Gauge

Number of batches inserted together

insertTimeAvg - Time

Average time to perform a successful batch insert.

insertTimeMax - Time

Maximal duration to perform a successful batch insert.

insertTimeMin - Time

Minimal duration to perform a successful batch insert.

nActiveInserts - Counter

Number of active insert requests

nWriteFailures - Counter

Number of tuples that failed to get written to IBM Db2 Event Store

nWriteSuccesses - Counter

Number of tuples that were written to IBM Db2 Event Store successfully

Libraries

Operator class library
Library Path: ../../impl/lib/com.ibm.streamsx.eventstore.jar, ../../opt/*, ../../opt/downloaded/*