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.
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') # add event store toolkit corresponding to your Event Store installation (developer/enterprise edition) and version streamsx.spl.toolkit.add_toolkit(topo, 'PATH_TO_STREAMSX_EVENTSTORE_TOOLKIT_LOCATION') # provide connection endpoint information es_connection = 'HostIP:Port' # 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') 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-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 152dae07418578d39edfb3c70d245c2a64ab11efa642c5451c4abb8834b05dad |
|
MD5 | 059f7f3a2530425fa132768ce0764c8d |
|
BLAKE2b-256 | 12ec27c6982bbad9d001f9cee7ef59c09c578f481fae31d637c7a36f46313024 |
Hashes for streamsx.eventstore-1.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b62f02de9307f0ba0c99b37f7ef5ab6b4f9f74e18670ed10565952cdeca3faf1 |
|
MD5 | 80297e6ef29850fc989a2c5f5e5c7103 |
|
BLAKE2b-256 | 3b8c6c9a1b687e3078530218dd0cc5c535edd8163f351dbb3d2973718c8aeefc |