How to connect a Cloudant database as datasource in Watson Studio?

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

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.
    03-notebook.gif
  • 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.
    04-notebook

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 github05-notebook.gif 

If you want to dig that topics, here are some more options to read:

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

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.