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

How a company transformed employee HR experience with an AI assistant

3 min read - IBM Build Partner Inspire for Solutions Development is a regional consulting firm that provides enterprise IT solutions across the Middle East. Jad Haddad, Head of AI at Inspire for Solutions Development has embraced the IBM watsonx™ AI and data platform to enhance the HR experience for its 450 employees. Next-gen HR for a next-gen workforce As a new generation of digital natives enters the workforce, we are seeing new expectations around the employee experience. Gen Z employees prefer an HR…

Fantasy Football trades: How IBM Granite foundation models drive personalized explainability for millions

4 min read - With almost 1,700 players in 272 games, the amount of data generated during the NFL football season is enormous. Fantasy football team owners are faced with complex decisions and an ocean of information. Deciding who to start, who to bench and who to trade each week can be a daunting task. It can also be a lot of fun—and that’s why the ESPN Fantasy app engages 12 million fantasy football users each year.  For the last 8 years, IBM has…

Advance your enterprise Journey to Hybrid Cloud and AI powered by AIOps on Z

2 min read - Thanks to rising costs, skills shortages and ever-growing security threats, businesses must adapt quickly to shifts in demand patterns brought on by a digital workforce and rapidly changing buyer behavior. That requires putting extra emphasis on the resiliency and performance of your business processes and supporting applications. For larger IT organizations with increasingly hybrid and complex application landscapes that often include IBM Z®, it’s essential to take a comprehensive approach to IT operations. The challenge becomes “How do you effectively sift through terabytes of…

IBM Newsletters

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