Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

streamsx.database-0.2.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

streamsx.database-0.2.0-py2.py3-none-any.whl (10.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file streamsx.database-0.2.0.tar.gz.

File metadata

  • Download URL: streamsx.database-0.2.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.5

File hashes

Hashes for streamsx.database-0.2.0.tar.gz
Algorithm Hash digest
SHA256 def0226856e83bba285a0df5b49ad9708af56770a0920212a59faec4a3a8a649
MD5 b64f8afdc74272abcb8d6653a1527032
BLAKE2b-256 ef8a46df29ecfea3a5272056748342984b5a282041bb920d7c307684572218e4

See more details on using hashes here.

File details

Details for the file streamsx.database-0.2.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for streamsx.database-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ffbb90f31a12e0d8e3afdbb2a578716a99de7c34b30f69c0267ffb0d3a3465fd
MD5 34c922b95bc3f4ec036bfb7c1f454332
BLAKE2b-256 a76050ec3ce3a9f79f2b0cfbe0093a98d9d89f760bbac7da5f1fddbab60b9dfd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page