What query language hasn't left you wanting of just a few more functions? The Juttle dataflow language comes with powerful built-in functions like percentile() but you can define your own functions or reducers that operate on every point in a stream or on batches of points. You can also import functions that other people have written.
In this example, we implement an exponentially weighted moving average function and import a derivative function.
- Try changing the weight used in the ewma function by changing .9 to .1 on line 16.
- On line 7, we've imported a derivative reducer. Let's see what it does by uncommenting line 17, then adding "der" to the list of columns in the timechart.