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') 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.0.0b1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed81eb403b60a5ffa4d47fc6ecb5806f7797156ac8f299dc67e7132928f79bac |
|
MD5 | c0b0ba7cfe9916b8866dc921555dd38a |
|
BLAKE2b-256 | c1f4af29e63d0daa2acce9ed16df81189f396f069445ce1a8aad27ca1c8f710b |
Hashes for streamsx.eventstore-2.0.0b1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b02e3f87398a2dd0bcb53a09e19cd7d35dea818a3f6b473ea3c88aa17963077c |
|
MD5 | c0a388d63347211d0b1951074c1421cd |
|
BLAKE2b-256 | 25196a477a54c23921525091b0c478375467b108b59357c6b5b4521554b09395 |