JSONata ... JSON query and transformation language

775 views
Skip to first unread message

Scott C. Lemon

unread,
Nov 7, 2016, 12:18:58 PM11/7/16
to Node-RED
Wow ... just saw this video, and the longer one.  JSONata looks incredibly powerful ... we need to get his Node-RED node turned into a real node!  :-)




Can the IBM folks here find out the status or direction of his demo node?

In the mean time we can install the npm and then define it in the Global Context?

Sebastian Barwe

unread,
Nov 7, 2016, 1:18:37 PM11/7/16
to Node-RED
nice - something like xquery/xpath for json (though it looks a bit more powerful with all the additional aggregation functionality).

Looking at all these nosql databases out there it would be great to have such kind of "client query language" between client and server especially for applications that are not dependent on a specific database.

will follow this project - thanks for mentioning it.

Nicholas O'Leary

unread,
Nov 7, 2016, 1:25:59 PM11/7/16
to Node-RED

Yes, it is very cool. The team behind it are based in the building next door. We're overdue a chat this week to figure out what the next steps are. A standalone node is the obvious choice, but it gets more interesting when we look at what core nodes could do with it.

Nick


--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/45c95f55-113d-4aa4-a29b-44f46b857396%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sebastian Barwe

unread,
Nov 7, 2016, 1:26:58 PM11/7/16
to Node-RED
regarding all these questions ... an informative but not well structured document answers a lot:

And my question regarding databases as well :)
 


Julian Knight

unread,
Nov 7, 2016, 6:22:51 PM11/7/16
to Node-RED
Go for it! It would make a superb addition to Node-RED.

Wish there was a PowerShell/.Net wrapper for it too as that would massively help when querying data from Office 365.

steve rickus

unread,
Nov 8, 2016, 12:23:46 PM11/8/16
to Node-RED

As soon as I saw the XPath-like syntax, and the ability to munge JSON in-place with functions and lambdas, I built a node locally to evaluate the JSONata syntax on the incoming msg object. It works great -- once you get your head around the specifics of the syntax ;*) Here is how it looked in my local install:





BUT, I soon came to the same conclusion as Nick -- this really needs to be the defacto syntax for ALL the nodes to use. It adds whole new levels of functionality that can pull specific fields out of a message, which reduces the need for special function nodes to reformat the msg.payload (or other fields) to fit what the next node is expecting. Imagine if every node editor field was JSONata enabled? +1 for this idea...
--
Steve

Nicholas O'Leary

unread,
Nov 8, 2016, 1:42:04 PM11/8/16
to Node-RED

One request to all - please hold off publishing your own jsonata nodes whilst we figure out what we want to do in the core. Would rather energies were spent getting that right.

Nick


--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.

steve rickus

unread,
Nov 8, 2016, 2:24:05 PM11/8/16
to Node-RED
I actually prototyped this one week before the Open Tech talk that Scott linked to above. Once I saw that the author had already developed his own node-red node, I stopped working on it -- figured it's best to wait for them to take the lead. So I'm really glad to see the two teams tackling it together. As usual, the rest of the community will love whatever y'all come up with, no doubt!

Scott C. Lemon

unread,
Nov 8, 2016, 3:32:11 PM11/8/16
to Node-RED
Excellent to hear that this is going to become something real in Node-RED ... I agree with Nick and Steve that this has tremendous value in the core!

Keep us up to date on what is happening!  :-)

Julian Knight

unread,
Nov 10, 2016, 4:37:57 AM11/10/16
to Node-RED
I'm quite excited by this actually. I've always had two hats on when looking at things like Node-RED. On the one hand, the reason I mainly use it is for IoT/Home Automation as a hobby project. But I also evaluate things like this from a professional/enterprise perspective looking for data management tools. Node-RED has never quite been a perfect fit for this use case. JSONata integration may well be the tipping point that changes my view. I'd love to see a robust, relatively easy to use, visual, information processing toolkit that we could deploy to our 8k+ staff to use alongside Excel, PowerBI and the like.

Brad Powell

unread,
Nov 10, 2016, 10:39:21 AM11/10/16
to Node-RED
Julian,

Not to distract from the point of this thread, JSONata, which is very cool, but I'm in the same boat as you... use Node-RED for more hobby type projects up until now, but am always looking at how to utilize it professionally.

Very similar in concept to Node-RED is a product called Apache NiFi. I have started using it in enterprise environments (proof-of-concept projects), but it's a lot more "heavy" than Node-RED, for legitimate reasons. I'm not saying NiFi is usable by the general corporate masses, but I think it can be used by some of the more technically-inclined business users. 

Eventually I could see Node-RED incorporating some of the concepts in NiFi (e.g. queues between nodes), and that would be powerful.

Brad

Julian Knight

unread,
Nov 10, 2016, 12:34:11 PM11/10/16
to Node-RED
Thanks Brad, I've looked at all of the other flow-based tools and not really found any that fit into the easy to use bracket like Node-RED does. That's not to put them down, they certainly have their places but we already have complex, heavy tools for specialists. I guess what I really want is something that fits into the power user generalist camp. Something that you don't have to be a specialist in IT, Analytics, Stats, etc or be a data scientist to make use of. Also something that is light on the client PC, runs pretty much anywhere and follows our cloud-first principles.

Well, I can hope can't I? ;-)

Brad Powell

unread,
Nov 10, 2016, 2:07:37 PM11/10/16
to Node-RED
You sure can. Your statements mirror my hopes, too. Couldn't have said it better myself.

Dave C-J

unread,
Nov 10, 2016, 2:45:03 PM11/10/16
to node...@googlegroups.com
Well that is one of our goals too... we want the people who can handle a spreadsheet to be able to build powerful things that use events, so yes please keep us on track with good requirements that have general utility to the wider community.

Jéan Roux

unread,
Dec 31, 2016, 3:01:56 AM12/31/16
to Node-RED
Very interesting discussion, I am very interested in JSONata & direction this can send NR into. I was looking for a way to publish JSON OData REST interfaces to different sets of data for users of the data. Very similar to what opensensors.io team did with the historical data gathered from sensors, where they punish a REST service for your data. JSONata could come in very handy to query to format the data streams.

On publishing REST api's. anything that can make this easy?

Dave C-J

unread,
Dec 31, 2016, 5:59:36 AM12/31/16
to node...@googlegroups.com
Hi Jean,

the upcoming 0.16 release of Node-RED will include JSONata expression support directly in both the change and switch nodes, so should help you do that. The existing http endpoints support rest and also swagger for documentation of the API.

Jéan Roux

unread,
Dec 31, 2016, 7:02:56 AM12/31/16
to Node-RED
Thanks Dave!

Julian Knight

unread,
Dec 31, 2016, 7:15:28 AM12/31/16
to Node-RED
Looking forward to that!

I also note that there are several node.js libraries for publishing ODATA REST interfaces so it shouldn't be that hard to create a node to do that. OData is a bit Microsoft'y but can be useful for integration to SharePoint and Excel.

Jéan Roux

unread,
Dec 31, 2016, 5:41:57 PM12/31/16
to Node-RED
Thanks Julian, will have a look. Re "OData is a bit Microsoft'y", my understanding is that OData is becoming big in SAP's live, lots of support on the SAP HANA platform, also SAP enabled via Netweaver. Also, on http://www.odata.org/ecosystem/ I see 'IBM WebSphere eXtreme Scale' and DB2 also listed as OData producers. I am not fixated on OData, but its handy that i.e. Excel has native ability to connect to OData. the SAP strategic direction re OData support also makes it important in my life.

Julian Knight

unread,
Jan 1, 2017, 10:50:36 AM1/1/17
to Node-RED
Thanks for that info Jéan, useful. Didn't really mean to imply it was just Microsoft but they seem to have been the early drivers.

If you are on Excel 2010 or later, it has excellent data ETL (Extract, Transformation & Load) capabilities. Using free add-ons from Microsoft up until 2016, now baked in. Have a look at PowerQuery. Microsoft's PowerBI tools use the same ETL engine.

Tony Gilkerson

unread,
Jan 13, 2017, 10:38:24 AM1/13/17
to Node-RED
This is awesome.  I am very interested in JSONata functionality in NR.  I am looking forward to seeing a JSONata Node so I dont have to develop one... Great work!

Dave C-J

unread,
Jan 13, 2017, 10:41:25 AM1/13/17
to node...@googlegroups.com
It's now "baked in" to the Change and Switch nodes in the current 0.16 release.

--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.

To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.

For more options, visit https://groups.google.com/d/optout.



--
regards

Dave Conway-Jones

Reply all
Reply to author
Forward
0 new messages