IBM Streams Event Store integration
Project description
Overview
Provides a function to insert IBM Streams tuple data into a table in IBM Db2 Event Store.
IBM Db2 Event Store is an in-memory database designed to rapidly ingest and analyze streamed data in event-driven applications. It provides the fabric for fast data with its ability to process massive volume of events in real-time, coupled with optimization for streamed data performance for advanced analytics and actionable insights.
This package exposes the com.ibm.streamsx.eventstore toolkit and com.ibm.streamsx.jdbc toolkit as Python methods.
Supported versions:
Db2 Event Store 1.x: streamsx.eventstore version 1.x
Db2 Event Store 2.x: streamsx.eventstore version 2.x
Sample
A simple example of a Streams application inserting rows to a table in a Db2 Event Store database:
from streamsx.topology.topology import Topology from streamsx.topology.schema import CommonSchema, StreamSchema from streamsx.topology.context import submit from streamsx.topology.context import ContextTypes import streamsx.spl.toolkit import streamsx.eventstore as es topo = Topology('EventStoreSample') # provide connection endpoint information es_connection = 'HostIP:Port1;HostIP:Port2' # generate sample tuples with the schema of the target table s = topo.source([1,2,3,4,5,6,7,8,9]) schema=StreamSchema('tuple<int32 id, rstring name>').as_tuple() s = s.map(lambda x : (x,'X'+str(x*2)), schema=schema) # insert tuple data into table as rows res = es.insert(s, connection=es_connection, database='TESTDB', table='SampleTable', primary_key='id', partitioning_key='id') submit (ContextTypes.DISTRIBUTED, topo) # The Streams job is kept running.
Documentation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for streamsx.eventstore-2.4.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ad8b6e9749270e04988fadad6b782580fac9ff70c8a7cc836ca72c88a329193 |
|
MD5 | 7ff8aa9dad859919ac1f94ee8d6b1682 |
|
BLAKE2b-256 | 5304129b047a3ba46cab6a21c1695c7695bcf06b7994d0ab5ed7c1b458688ab9 |
Hashes for streamsx.eventstore-2.4.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 201a4c513130c1b0754874ff7fc2d932cef4bd45a0a432a50f90ed43e9c429ee |
|
MD5 | 38d228ca4e3c7ceee1127cd0312077ec |
|
BLAKE2b-256 | 5cf3d53f5f128683e1c92070550d41d6f3e6ab4f0e8de137d050142eb61b2907 |