node-red-contrib-tdengine

0.0.3 • Public • Published

This repositry create a custom Node-Red node for configing TDEngine server connection and execute SQL from preview node msg.payload

Design

Use Taos data restful API to commit SQL, API call like

curl -H 'Authorization: Basic <TOKEN>' -d '<SQL>' <ip>:<PORT>/rest/sql/[db_name]

Input options:

  • DB Server: Setup server connection or select a exist server
  • DB Name: Database to execute SQL

Use axios to call http request

Usage

  1. Start Node-Red
  2. Install TDEngine node
  3. Add "taos query" node to workspace from palette
  4. Setup a TDEngine server and database name
  5. Add function or other node to create SQL, put SQL into msg.payload
  6. Link to "taos query" node

Demo

  1. Start Node-Red by docker
docker run -it -p 1880:1880 -v node_red_data:/data --name mynodered nodered/node-red
  1. Import sample flow "demo/flow.json" import-flow
  2. Install TDEngine node by name "node-red-contrib-tdengine", current version is 0.0.2 alt
  3. Modify your TDEngine server config alt
  4. Edit test SQL alt
  5. Start flow by click Inject node

Dependencies (1)

Dev Dependencies (1)

Package Sidebar

Install

npm i node-red-contrib-tdengine

Weekly Downloads

10

Version

0.0.3

License

ISC

Unpacked Size

983 kB

Total Files

10

Last publish

Collaborators

  • kp45