Skip to content

cyu021/node-red-cassandra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

node-red-cassandra

This is a simple custom node made for Node-RED (http://nodered.org/).

I need to access cassandra in Node-RED for a hobby project, and I fail to find a library to do so.
Hence, I decide to make a custom node which leverages the "cassandra-driver" released by DataStax (http://www.datastax.com/).

node-red-cassandra currently covers only whatever I need to achieve in Node-RED:

  1. issue insert / update / delete cql with prepared statement to cassandra and output with retrieved results

[Installation]
Extremely simple, just drop "cassandra.js" and "cassandra.html" into the "nodesDir", and you are ready to go!

[How to use it]

  1. add cql string to msg.payload.cql (https://drive.google.com/file/d/0B7PMZ6dMoMGUSGwwME42V3VDOGs/view?usp=sharing)
  2. add parameters, an array of JSON with "v" as attribute name, to msg.payload.params (https://drive.google.com/file/d/0B7PMZ6dMoMGURTNIQXRYN2Z5Q0k/view?usp=sharing)
  3. load cassandra-driver into an object and add the object to msg.cassandra then put the function before "cassandra" node (https://drive.google.com/file/d/0B7PMZ6dMoMGUZmNpZWhQWldrS28/view?usp=sharing)
  4. assign contactPoints and keyspace to "cassandra" node (https://drive.google.com/file/d/0B7PMZ6dMoMGUUDRTX0hLazVYS1U/view?usp=sharing)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published