February 3, 2015 By Rakesh Ranjan 3 min read

Welcome SQLDB and dashDB nodes to Node-RED family!

The Node-RED starter community boilerplate in Bluemix has been an extremely popular service as it allows developers to simplify the coding of apps that wire things together using visual tools. The Node-RED flow editor allows developers to bring sensors, devices and apps together and facilitates collection of data for “if this then that” application. With its rich set of nodes, it always attracted variety of developers from all walks of programming. However, if a developer wanted to pump data into a relational database and use SQL for analytic queries or R models for statistical analysis, he had a little choice—until now.

I am happy to announce that my colleagues Steven Chamberlin and Nicholas Vargas in IBM Cloud data services team have developed a pair of nodes for SQLDB and dashDB services and contributed to the Node-RED community. As of last week, you can create a Node-RED app in Bluemix that will give you the four extra nodes, two each for SQLDB and dashDB.

SQLDB Output Node:

This node stores elements from the msg.payload into your SQLDB service. The msg.payload should include a value for each column in your table. If you put a ‘TIMESTAMP’ string as one of the values, the node will replace it with the current timestamp in DB2 format.

  • Service should point to your SQLDB service.

  • Table should point to the table you wish to insert the values into. This table needs to exist already in the database and needs to contain the same columns and datatypes that you are inserting through this node. The data needs to be in the format accepted by DB2 and within the appropriate ranges/parameters for that datatype.

  • Name Optionally give your node a name, otherwise the default will be the table name.

SQLDB Query Node:

This node executes a query on your SQLDB service database and passes along the result set in the msgobject, as msg.payload.

  • Service should point to your SQLDB service

  • Query is the query you wish to execute on your SQLDB service database. If it is empty, it will look for the query in the msg.payload.

  • Parameter Markers is a comma delimited set of JSON paths. These will replace any question marks that you place in your query, in the order that they appear.

  • Name Optionally give your node a name, otherwise the default will be the table name.

dashDB Output Node:

This node stores elements from the msg.payload into your dashDB service. The msg.payload should include a value for each column in your table. If you put a ‘TIMESTAMP’ string as one of the values, the node will replace it with the current timestamp in DB2 format.

  • Service should point to your dashDB service.

  • Table should point to the table you wish to insert the values into. This table needs to exist already in the database and needs to contain the same columns and datatypes that you are inserting through this node. The data needs to be in the format accepted by DB2 and within the appropriate ranges/parameters for that datatype.

  • Name Optionally give your node a name, otherwise the default will be the table name.

dashDB Query Node:

This node executes a query on your dashDB service database and passes along the result set in the msgobject, as msg.payload.

  • Service should point to your dashDB service.

  • Query is the query you wish to execute on your dashDB service database. If it is empty, it will look for the query in the msg.payload.

  • Parameter Markers is a comma delimited set of JSON paths. These will replace any question marks that you place in your query, in the order that they appear.

  • Name Optionally give your node a name, otherwise the default will be the table name.

Go, try these nodes in Node-RED in Bluemix and build your cool analytic app. In my next post I will discuss how to use dashDB’s integrated R capability to develop models and generate graphs.

Was this article helpful?
YesNo

More from

The journey to a mature asset management system

3 min read - This blog series discusses the complex tasks energy utility companies face as they shift to holistic grid asset management to manage through the energy transition. Earlier posts in this series addressed the challenges of the energy transition with holistic grid asset management, the integrated asset management platform and data exchange, and merging traditional top-down and bottom-up planning processes. Asset management and technological innovation Advancements in technology underpin the need for holistic grid asset management, making the assets in the grid…

IBM Consulting augments expertise with AWS Competencies: A win-win for clients 

3 min read - In today's dynamic economic landscape, businesses demand continuous innovation and speed of execution. At IBM Consulting®, our unwavering focus on partnerships and shared commitment to delivering enterprise-level solutions to mutual clients have been core to our success.   We are thrilled to announce that IBM® has recently gained five competencies from Amazon Web Services (AWS) in vital domains including Cloud Operations, Internet of Things (IoT), Life Sciences, Mainframe Modernization, and Telecommunications. With these credentials, IBM further establishes its position as a…

Getting ready for artificial general intelligence with examples

12 min read - Imagine a world where machines aren't confined to pre-programmed tasks but operate with human-like autonomy and competence. A world where computer minds pilot self-driving cars, delve into complex scientific research, provide personalized customer service and even explore the unknown. This is the potential of artificial general intelligence (AGI), a hypothetical technology that may be poised to revolutionize nearly every aspect of human life and work. While AGI remains theoretical, organizations can take proactive steps to prepare for its arrival by…

IBM Newsletters

Get our newsletters and topic updates that deliver the latest thought leadership and insights on emerging trends.
Subscribe now More newsletters