{"id":21482849,"url":"https://github.com/ibmstreams/sample.starter_notebooks","last_synced_at":"2025-07-15T14:30:43.125Z","repository":{"id":54112466,"uuid":"189106498","full_name":"IBMStreams/sample.starter_notebooks","owner":"IBMStreams","description":"Notebooks showing Streams applications written in Python","archived":false,"fork":false,"pushed_at":"2021-03-09T07:19:13.000Z","size":8666,"stargazers_count":4,"open_issues_count":3,"forks_count":16,"subscribers_count":10,"default_branch":"latest","last_synced_at":"2025-04-09T05:05:45.591Z","etag":null,"topics":["db2","kafka","machine-learning","python","streaming","streaming-data"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IBMStreams.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-28T21:34:13.000Z","updated_at":"2024-01-22T11:47:00.000Z","dependencies_parsed_at":"2022-08-13T06:50:53.063Z","dependency_job_id":null,"html_url":"https://github.com/IBMStreams/sample.starter_notebooks","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/IBMStreams/sample.starter_notebooks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IBMStreams%2Fsample.starter_notebooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IBMStreams%2Fsample.starter_notebooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IBMStreams%2Fsample.starter_notebooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IBMStreams%2Fsample.starter_notebooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IBMStreams","download_url":"https://codeload.github.com/IBMStreams/sample.starter_notebooks/tar.gz/refs/heads/latest","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IBMStreams%2Fsample.starter_notebooks/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265437841,"owners_count":23765141,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["db2","kafka","machine-learning","python","streaming","streaming-data"],"created_at":"2024-11-23T12:38:16.880Z","updated_at":"2025-07-15T14:30:41.509Z","avatar_url":"https://github.com/IBMStreams.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Starter notebooks for Streams applications\n\nThese notebooks are a good starting point for using the [Streams Python API](http://ibmstreams.github.io/streamsx.documentation/docs/python/1.6/python-appapi-devguide/).\n\n### Sample notebook descriptions\n- **Start Here:** [Streams-RollingAverageSample](#RollingAverageSample):  If you are new to Streams, get started by using this notebook template. \n- [Streams-BasicSample template](#BasicSample):  Use this template if you are familiar with Streams and need a few code cell examples.\n- [Streams-DatabaseSample application](#DatabaseSample): connect to a Db2® Warehouse database, perform some SQL queries, and view the results.\n- [Streams-EventStoreSample application](#EventStoreSample): ingests data into a Db2 Event Store table and views the metrics of the insert operation. \n- [Streams-EventStreamsSample application](#EventStreamsSample): ingests data into the IBM Event Streams service and consumes the data from IBM Event Streams.\n- [Streams-HbaseSample application](#HbaseSample): Connect to Apache HBase, perform some operations on a table, and view the results.\n- [Streams-HdfsSample application](#HdfsSample): connect to Apache Hadoop Distributed File System (HDFS).\n- [Streams-KafkaBasicSample application](#KafkaBasicSample):  demonstrates how to create a Streams Python application that connects to a Kafka cluster. \n- [Streams-KafkaParallelSample application](#KafkaParallelSample):  connects to a Kafka cluster by using a consumer group and uses partitioned parallel processing of fetched messages.\n- [Streams-PMMLScoringSample application](#PMMLScoringSample): perform scoring with a Predictive Model Markup Language (PMML) model and view the results.\n- [Streams-CPD-WMLScoringSample application](#WMLScoringSample): Shows storing, deploying and online scoring using Watson Machine Learning (WML) instance in Cloud Pak for Data\n- [Streams-SPLToolkitsTutorial](#SPLToolkitsTutorial): demonstrates how to discover toolkits and python packages, shows how to integrate SPL toolkit operators in your topology\n\n[See below](#howto) for how to add these notebooks to IBM Watson Studio or IBM Cloud Pak for Data.\n\n\n### Find more samples\n- Search the [IBM Streams samples catalog](https://ibmstreams.github.io/samples/?filter=python) for more advanced Python samples.\n\n### Getting help\n\nOpen an issue or [ask a question on the IBM support forums](https://www.ibm.com/mysupport/s/forumsproduct?language=en_US\u0026name=Streams\u0026id=0TO50000000IQN0GAO).\n\n\n\u003ca name=\"howto\"\u003e\u003c/a\u003e\n### Importing a notebook in IBM Cloud Pak for Data (CPD) or Watson Studio\n\nFollow these steps to import any of the notebooks in this repository:\n\n- Copy the GitHub URL to the notebook.\n- From your Cloud Pak for Data or Watson Studio project, click \"Add notebook\". \n- Select the **From URL** tab, and paste the URL in the **Notebook URL** field.\n- Click **Create notebook**.\n\n\n![add a notebook from icp4d](img/add-notebook-icp4d.gif)\n\n\n\u003ca name=\"RollingAverageSample\"\u003e\u003c/a\u003e\n**Streams-RollingAverageSample application**\n If you are new to Streams, get started by using this notebook template. This template provides detailed instructions on how to create a streaming Python application, which simulates a data hub that receives readings from sensors. You can find examples of how to perform the following tasks:\n\n    - Set up your data connections.\n    - Create a streams processing application by creating a Topology object, defining sources, analyzing data, and defining the output.\n    - Submit a job to the StreamsStreams instance to start the streams processing application. Applications that run on the Streams - instance are called jobs.\n    - Connect to the job to view data.\n    - Cancel the running job.\n\n\n\u003ca name=\"BasicSample\"\u003e\u003c/a\u003e\n**Streams-BasicSample template**\n    If you are familiar with Streams and need a few code cell examples, use this template to get started. This template includes all Python code cells that you need to perform the following tasks:\n\n        Create a streams processing application.\n        Submit a job to the Streams instance.\n        View the data collected by the streams processing application.\n        Cancel the running job when needed.\n\n    You can modify the template cells as needed to create your own streams-processing applications.\n\n\u003ca name=\"SPLToolkitsTutorial\"\u003e\u003c/a\u003e\n**Streams-SPLToolkitsTutorial template**\n    If you are familiar with Streams Processing Language (SPL) and want instructions to use SPL composites and operators, use the Streams-SPLToolkitsTutorial notebook. This tutorial includes all Python code cells that you need to perform the following tasks:\n\n        Discover toolkits that are installed on the Streams build service\n        Launch the SPL main composite\n        Work with microservices\n        Integrate SPL operators in a Python topology\n\n    You can modify the template cells as needed to create your own streams-processing applications.\n\nIn addition, these templates include the following code samples and sample applications:\n\u003ca name=\"DatabaseSample\"\u003e\u003c/a\u003e\n**Streams-DatabaseSample application**\n    This sample application demonstrates creating a Streams Python application to connect to a Db2® Warehouse database, perform some SQL queries, and view the results. It includes all Python code cells that you need to perform the following tasks:\n\n        Set up your data connections.\n        Create a streams processing application.\n        Submit a job to the Streams instance to start the streams processing application.\n        Cancel the running job.\n        \n\u003ca name=\"EventStoreSample\"\u003e\u003c/a\u003e\n**Streams-EventStoreSample application**\n    This sample application demonstrates creating a Streams Python application that ingests data into a Db2 Event Store table and views the metrics of the insert operation. It includes all Python code cells that you need to perform the following tasks:\n\n        Set up your data connections.\n        Create a streams processing application.\n        Submit a job to the Streams instance to start the streams processing application.\n        Connect to the job to view metrics.\n        Cancel the running job.\n        \n\u003ca name=\"EventStreamsSample\"\u003e\u003c/a\u003e\n**Streams-EventStreamsSample application**\n    This sample application demonstrates creating a Streams Python application that ingests data into the IBM Event Streams service and consumes the data from IBM Event Streams. It includes all Python code cells that you need to perform the following tasks:\n\n        Set up your data connections.\n        Create a streams processing application.\n        Submit a job to the Streams instance to start the streams processing application.\n        Connect to the job to view data.\n        Cancel the running job.\n        \n\u003ca name=\"HbaseSample\"\u003e\u003c/a\u003e\n**Streams-HbaseSample application**\n    This sample application demonstrates creating a Streams Python application to connect to HBASE, perform some operations on a table, and view the results. It includes all Python code cells that you need to perform the following tasks:\n\n        Set up your data connections.\n        Create a streams processing application.\n        Submit a job to the Streams instance to start the streams processing application.\n        Connect to the job to view data.\n        Cancel the running job.\n        \n\u003ca name=\"HdfsSample\"\u003e\u003c/a\u003e\n**Streams-HdfsSample application**\n    This sample application demonstrates creating a Streams Python application to connect to HDFS, perform some operations on a table, and view the results.. It includes all Python code cells that you need to perform the following tasks:\n\n        Set up your data connections.\n        Create a streams processing application.\n        Submit a job to the Streams instance to start the streams processing application.\n        Connect to the job to view data.\n        Cancel the running job.\n        \n\u003ca name=\"KafkaBasicSample\"\u003e\u003c/a\u003e\n**Streams-KafkaBasicSample application**\n    This sample application demonstrates how to create a Streams Python application that connects to a Kafka cluster. The focus of this notebook is on creating a connection with a Kafka cluster. It includes all Python code cells that you need to perform the following tasks:\n\n        Set up your data connections.\n        Create two streams processing applications.\n        Submit two jobs to the Streams instance to start the streams processing applications.\n        Connect to the consumer job to view data.\n        Cancel the running jobs.\n        \n\u003ca name=\"KafkaParallelSample\"\u003e\u003c/a\u003e\n**Streams-KafkaParallelSample application**\n    This sample application demonstrates how to create a Streams Python application that connects to a Kafka cluster by using a consumer group and uses partitioned parallel processing of fetched messages.. It includes all Python code cells that you need to perform the following tasks:\n\n        Set up your data connections.\n        Create two streams processing applications.\n        Submit two jobs to the Streams instance to start the streams processing applications.\n        Connect to the consumer job to view data.\n        Cancel the running jobs.\n\n\u003ca name=\"WMLScoringSample\"\u003e\u003c/a\u003e\n**Streams-CPD-WMLScoringSample application**\n    This sample application requires Watson Machine Learning service, shows storing, deploying and online scoring of the Iris PMML model and view the results. It includes all Python code cells that you need to perform the following tasks:\n\n        Work with the Watson Machine Learning (WML) instance\n        Store a PMML model in WML repository\n        Deploy the stored model as Online Deployment\n        Score single data with the deployed model to test the deployment\n        Create the application.\n        Submit a job to the IBM Streams instance to start the streams processing application.\n        Connect to the job to view data.\n        Cancel the running job.\n        \n\u003ca name=\"PMMLScoringSample\"\u003e\u003c/a\u003e\n**Streams-PMMLScoringSample application**\n    This sample application demonstrates creating a Streams Python application to perform scoring with a Predictive Model Markup Language (PMML) model and view the results. It includes all Python code cells that you need to perform the following tasks:\n\n        Set up your data connections.\n        Download sample model and sample data file \n        Create the application.\n        Submit a job to the IBM Streams instance to start the streams processing application.\n        Connect to the job to view data.\n        Cancel the running job.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibmstreams%2Fsample.starter_notebooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fibmstreams%2Fsample.starter_notebooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibmstreams%2Fsample.starter_notebooks/lists"}