Scripting

Joule core provides the ability to deploy declariative 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.

Example

The below example computes, per event, the spend ration based upon a Javascript expression.

features:
  compute:
    spend_ratio:
      scripting:
        macro:
          expression: 1 - spend/avg_spend
          variables:
            avg_spend: 133.78

Attributes

AttributeDescriptionData TypeRequired

expression

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