Working with NTL

Overview

The Nimbus Transformation Language (NTL) is a high level language for reshaping telemetry data.

When Nimbus makes an optimization, it generates NTL to describe when and how an optimization should be made.

You can edit generated transforms to tailor it for your specific business requirements (this is not necessary in the majority of cases).

Nimbus Predicates

Nimbus predicates evaluate a series of expressions and return a boolean. They have the following syntax

- key: 
  op:
  val:
  • key: the dot delimited path

  • op: any NTL valid operator

  • val: the expected value

Note that key can be omitted in which case the value is expected to be a list of Nimbus predicates.

Comparison Operators

EQUAL

Checks whether two elements are exactly equal in value

key: foo
op: equal
val: 42

EXISTS

Checks whether a particular path exists in an object

key: foo
op: exists
val: true

MATCH

Regex match

key: foo
op: match
val: "foo"

MATCH_ANY

Regex match against an array of values

key: foo
op: match_any
val: ["foo", "foobar"]

Logical Operators

AND

op: AND
val: 
  - key: foo
    op: exists
    val: true
  - key: foo
    op: equal
    val: 42

NOT

op: NOT
val: 
  key: foo
  op: equal
  val: 42

OR

op: OR
val: 
  - key: foo
    op: exists
    val: true
  - key: foo
    op: equal
    val: 42

Last updated