I just want to share this small information: How to connect a Cloudant database as a datasource and use the data in Watson Studio?
You maybe have a Node-RED flow and you want to use sample IoT data from that flow in a jupyter notebook? Therefor you save the data for example in a Cloudant database and then you access the data inside Watson Studio in a jupyter notebook to work with the data. Maybe that flow could be useful in a Hackathon.
Here are the steps:
Step 1: Setup the integration for Watson IoT, sensor simulator and Cloudant in Node-RED
- Configure the Watson IoT node with the device ID of the IoT temperature sensor simulation
- Configure the Cloudant node to create a Cloudant database for your sample sensor data.
Step 2: Create a service and a data connection in Watson Studio to access the data of the Cloudant database
- First you have to create a connection to the Cloudant service that contains the different databases. With that connection you will create later a data connection to a specific Cloudant database of your Cloudant service.
That is the reason why you need the credentials from your Cloudant service to setup the connection.
- Now you are able to create a data connection. Just select the database you used to save your IoT data in the Node-RED flow.
Step 3: Use the data inside your Jupyter notebook
- Let’s create a notebook and use the given data connection in Watson Studio. To do this, you only insert the credentials of the datasource in your notebook and follow the steps of the sample notebook I created. That notebook can connect to a Cloudant database and display the data.
Note: The sample notebook is available on github
If you want to dig that topics, here are some more options to read:
- Watson IoT
- Node-RED
- Watson Studio
- Jupyter notebook in Watson Studio
- Good blog post from Glynn Bird Using Cloudant from Jupyter Notebooks
(i used some of the information to create the sample notebook)
- Good blog post from Glynn Bird Using Cloudant from Jupyter Notebooks
I hope this was useful for you and let’s see what’s next?
Greetings,
Thomas
PS: You can try out Cloud Foundry Apps or Kubernetes on IBM Cloud. By the way, you can use the IBM Cloud for free, if you simply create an IBM Lite account. Here you only need an e-mail address.
#ibmdeveloper, #ibmcloud, #watsonstudio, #nodered, #cloudant, #nodered, watsoniot
Leave a Reply