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 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.3.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1407cb7b70afc0597640b1ef1fdd058875408d0fc982317b3c67b848c2298ac |
|
MD5 | e9ada24ed6ab93cdc4027ad5587a4be4 |
|
BLAKE2b-256 | 9841303c64d88d372383cb7660dd843ae18b2ff1a8afd120db3a8f2c53fe7c64 |
Hashes for streamsx.eventstore-2.3.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | feffaf81742080c32f6f439da0ff91e78dd70c3a5404edaf148838ced254955c |
|
MD5 | 2060e09e03fd96fa26cd508b3138a6e0 |
|
BLAKE2b-256 | a141c39576aab68f5bf9392955fdef2a727d9a622f9cf3bb0aaca64442837c75 |