Intro to Cloudant Data Base Example
In this flow we are going to see how we can add data into the cloudant database as well as read data from the cloudant data base. This will help us in our further flows where we will can model data
Last updated
In this flow we are going to see how we can add data into the cloudant database as well as read data from the cloudant data base. This will help us in our further flows where we will can model data
Last updated
When you create a Node-RED instance using the Node-RED starter kit, you are also creating a Cloudant Database Service. This database allows you to store data that you may want to use while you are building out your flows.
Go back to IBM Cloud and search for your Node-RED service in the dashboard or in the search bar.
Click on your instance of Node-RED and you should see a cloudantNoSQLDB service in your connection's list
Click on your Cloudant Connection and it should take you to your connection list
Click on the Alias of .... link and that should take you to your Cloudant Service
Once on your Cloudant account go to Manage and you should be able to see Launch your cloudant dashboard.
Your Cloudant dashboard should include all the database tables you create in Node-RED
Make sure the inject value is a payload such as:
In this payload we are inserting "_id" and "mood"
In the cloudant data base node, name your data base and set operation as insert . This way you are inserting value into your db.
Insert another inject node and connect to the database node to read "_id" value
Insert a change node to change value of "mood" in the data base
Deploy your flow and in the debug node you should see :
Go to your Cloudant Database Dashboard and find the database you created
Click on your database and you should see a record of all your data
Click on record you recently created in Node-RED to see the changed data Value
You should successfully be able to see this values you stored and created in the cloudant database!