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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file streamsx.eventstore-2.3.2.tar.gz.
File metadata
- Download URL: streamsx.eventstore-2.3.2.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e756be25d11b70fb7591277ec100eba2554eb69a4d82c958fd14ad4f67a896f6
|
|
| MD5 |
765667836e8faaba8cf9ef68f336a578
|
|
| BLAKE2b-256 |
89c5591085ef47be6cb6906a4f3b9335db5bea53a3525c452e1bb2b503e1833e
|
File details
Details for the file streamsx.eventstore-2.3.2-py2.py3-none-any.whl.
File metadata
- Download URL: streamsx.eventstore-2.3.2-py2.py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c54972ae3a52aff23816905c3b5721b3e19eaae92a80804c57a2783f7c272e8
|
|
| MD5 |
b0e15c86e4eb23dfdad698b90cf6a54e
|
|
| BLAKE2b-256 |
e0be48cc3d4b2bd51c0d037d09fe78dd77d34c23635095b382e879f506668f5e
|