Scripting
Define custom analytics with declarative expressions
Last updated
Define custom analytics with declarative expressions
Joule core provides the ability to deploy declarative expressions using the custom analytics processor.
This has been reused within the context of feature engineering to enable users to define custom calculations within the DSL.
The example demonstrates per-event calculation of a spend_ratio using a JavaScript-based expression, where users can define variables, such as avg_spend to customise the calculation.
feature engineering:
...
features:
compute:
spend_ratio:
scripting:
macro:
expression: 1 - spend/avg_spend
variables:
avg_spend: 133.78expression
A valid mathematical expression
String
language
List of supported feature functions
String
Default: js
variables
Map of variables to be used during the execution of the expression.
Map
Last updated