Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member247294
Contributor
2,368

Introduction


During this hard times with the coronavirus crisis I found some spare time to learn and test Node-RED and I asked myself without luck "Why there isn't any node published to get data from SAP HANA Express v2.0?"

As any respectable programmer I took the challenge to deliver first Node-RED contrib node for executing queries to SAP HANA in--memory database engine.

With this release I consider myself worthy of saying the I'm proficient in Node-RED starting today 😉

It is tested with my SAP HANA Express v2.0SPS04 installed on my home server, details here : https://blogs.sap.com/2019/11/06/how-to-install-an-sap-hana-express-2.0-sps04-vm-server-for-developm...

There is short README.md file and an example flow how to use the node. Please let me know via github about issues or via email for any other topics.

https://www.npmjs.com/package/node-red-contrib-sap-hana

 

How to Use It


This package contains one node to run a sql command, call a procedure or a select statement for SAP HANA database using the office @Sap/hana-client Node.JS driver.

Query node usage:

You will need to fill in the following fields:

-- Database host name and port.

-- User name to access the database.

-- Password for the user name above.

-- Schema name.

Node usage:

The returned data will be stored in msg.payload and it will contains the @Sap/hana-client response.

To run a command or a query input to saphana node the folowing message :
msg.topic = "SQL"; // or lower case 'sql' 
msg.payload = "SELECT * FROM DUMMY";
return msg;

As an OK response you'll receive on the saphana node (or error):

{ topic : "RESULT_IN_LAYLOAD", payload : [{"DUMMY":"X"}] }

 

Currently, only SAP HANA Express has been tested.

Please let me know if you have any issue !

 

Example Flow Print Screen




https://github.com/radu103/node-red-contrib-sap-hana/blob/master/flows.json
1 Comment