Introduction

ibmcloudsql

The ibmcloudsql library provides to Python applications the APIs for working with structured data stored on IBM Cloud Object Storage using SQL language, which involves multiple resources/catalogs:

  1. IAM that controls access to all IBM cloud catalogs/resources.

  2. IBM COS where input and outpout data is stored.

  3. IBM Cloud SQL Query that offers the SQL-based data processing service.

  4. IBM Watson Studio (optional): that provides notebook environment for running notebook, in that (Python) code and data asset are also stored, implicitly, in the Project’s IBM Cloud Object Storage instance. Such project asset can be accessed using the project-lib library.

The ibmcloudsql library comes with multiple submodules, each contains one or many classes. The classes relate to each other via subclass mechanism. The submodules are the following:

  • utilities provides access to (1) - the IBM Cloud service connectivity-related functionality.

  • cos provides access to (1, 2, 4) - the COS-related functionality.

  • sql_magic provides the capability to construct a complex SQL statement, including time-series-related functionality.

  • SQLQuery provides access to (3) and to those provided by these submodules (utilities, cos, sql_magic).

For getting started, use this starter notebook. which provides notebook-based examples of user-specific code that also utilizes above submodules.

install

To install the published release of ibmcloudsql from PyPi, run the following:

pip install ibmcloudsql

For development purpose, you can also checkout the source, and then install in editable mode:

git clone git@github.com:IBM-Cloud/sql-query-clients.git
cd sql-query-client/Python
pip install -e .

To run the test on the package, run one of the following:

python -m pytest

pytest