Nested transformations

apply

Description

Examples

Arguments:
RULE_ID(string{1}),
VALUES(value-expression{1})

Applies the RULE_ID transform rule on the values in VALUES. RULE_ID must be the id of a transform rule in the current DTL specification.
["apply", "order", "_S.orders"]

This will transform the order values in the source entity’s orders field using the order transform rules. The output is the transformed order values.

apply-hops

Description

Examples

Arguments:
RULE_ID(string{1}),
HOPS_SPEC(dict{>1})

This function is a combined hops and apply function. It evaluates the hops, and then passes the result through the RULE_ID transform rule.
See the apply and the hops functions for more information about the parts.

Note

Use this function instead of apply if you use hops inside the transformation rule. This is required so that dependency tracking can work. Calling apply on a rule that contains hops or apply-hops is not allowed.

["apply-hops", "order", {
"datasets": ["orders o"],
"where": ["eq", "_S._id", "o.cust_id"]
}]

This will retrieve orders from the hops expression and then transform them using the order transformation rule. The output is the transformed order values.