IBM Streams Database integration
Project description
Overview
Provides functions to run SQL statements to a IBM Db2 Warehouse on Cloud. This package exposes the com.ibm.streamsx.jdbc toolkit as Python methods for services on IBM Cloud.
Sample
A simple hello world 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)
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-0.3.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e25c4288ff228221f5ed04cd36bab5fff3b0969e83f7f3f60d4d0482e5f31ec2 |
|
MD5 | 13d984d5d50cedf02f17703b9f2feb1a |
|
BLAKE2b-256 | a53a5bb02e0ffd9a52f8525115d6184c8ffba578cd43b0c1c2a05b490bc38ba2 |