Skip to content

Numeric Expression

See Numeric Expression for more information about this algorithm framework.

Creating a Numeric Expression Algorithm via API

  1. Retrieve the frameworkId for the Numeric Expression Framework. This information can be retrieved using the following endpoint:

    algorithm       GET /algorithm/frameworks

    The framework information should look similar to the following:

        "frameworkId": 26,
        "frameworkName": "Numeric Expression",
        "frameworkType": "BIG_DECIMAL",
        "description": "Numeric Expression masks input by ... [truncated for brevity].",
        "plugin": {
            "pluginId": 7,
            "pluginName": "dlpx-core",
            "pluginAuthor": "Delphix Engineering",
            "pluginType": "EXTENDED_ALGORITHM"
  2. Create a Numeric Expression algorithm instance via the following endpoint:

    algorithm   POST /algorithms

    Configure a new algorithm using the JSON formatted input similar to the following:

        "algorithmName": "NumericExpressionTest",
        "algorithmType": "COMPONENT",
        "frameworkId": 26,
        "algorithmExtension": {
            "expression": "Math.floor(((input * randomPercentage) * 100.0) + 0.5) / 100.0",
            "inputType": "DOUBLE",
            "constants": [
                    "name": "randomPercentage",
                    "value": "new java.util.Random(seed).doubles(0.1, 0.9).iterator().nextDouble()"
            "nonConformingDataDefaultValue": "100.0"

Numeric Expression Algorithm Extension

  • expression

    One-line mathematical expression written in the Java programming language that references input (the current unmasked value), e.g. input * 0.5 or input + Math.random().

  • inputType

    Data type that input conforms to within the expression. DOUBLE (default) is double-precision floating point, LONG is long integer, and BIG_DECIMAL is java.math.BigDecimal object.

  • constants (optional)

    An array of Constant objects. Constants are variables that the expression can reference by name and whose values remain fixed for the life of a masking job. Constants can reference by name other constants defined before them.

  • nonConformingDataDefaultValue (optional)

    Default masked value to be used if the unmasked input is not a numeric data type and can't automatically be converted to one.


  • name

    Must be valid Java variable name. No two constants can have the same name, nor can "input" or "seed" be used as a constant name.

  • value

    One-line Java expression that must return a value, which is not required to be numeric.