IBM Streams Database integration
Project description
Overview
Provides functions to run SQL statements to a database, for example IBM Db2 Warehouse.
This package exposes the com.ibm.streamsx.jdbc toolkit as Python methods for use with Streaming Analytics service on IBM Cloud and IBM Streams including IBM Cloud Pak for Data.
Sample
A simple example of a Streams application that creates a table, inserts a row and deletes the table:
from streamsx.topology.topology import * from streamsx.topology.schema import CommonSchema, StreamSchema from streamsx.topology.context import submit import streamsx.database as db topo = Topology() sql_create = 'CREATE TABLE RUN_SAMPLE (A CHAR(10), B CHAR(10))' sql_insert = 'INSERT INTO RUN_SAMPLE (A, B) VALUES (\'hello\', \'world\')' sql_drop = 'DROP TABLE RUN_SAMPLE' s = topo.source([sql_create, sql_insert, sql_drop]).as_string() res_sql = db.run_statement(s, credentials) res_sql.print() submit('STREAMING_ANALYTICS_SERVICE', topo) # Use for IBM Streams including IBM Cloud Private for Data # submit ('DISTRIBUTED', topo)
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
Close
Hashes for streamsx.database-1.5.0a2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a608fdf123318e8571444f0766598ddc7004877cc1963d8f54020739ffcce6c7 |
|
MD5 | 97a4392325f0bed304f0cae746785143 |
|
BLAKE2b-256 | 33b503fd3fe209d6f1dc66a8a3da25ddfffca246fc6c16b169fb267f74c4c43b |
Close
Hashes for streamsx.database-1.5.0a2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 420273eb6566ed1d2e3c2e006d19782d60527edfa2ab6c0e9f46bd811620a907 |
|
MD5 | f977dd276004798e626402e51553a128 |
|
BLAKE2b-256 | bd1f5e49148a442c793989abddd1700e78d26b1142c252c6556c2e97f74a70d0 |