CEL expressions and limitations in DataStage

Use expressions to define conditions, input values, and user variables in an orchestration flow. If a migrated sequence job contains expressions, they must be translated into CEL syntax.

You can access built-in functions and other coding elements through the Expression Builder. The Expression Builder uses CEL (Common Expression Language). For more information about built-in functions, see Functions. For DataStage-specific functions, see DataStage Functions.

Expressions are evaluated in the context of a particular job run in a specific scope. The scope can be a project, space, or catalog. Use the ctx object to refer to context properties such as the name and ID of the scope, job, user, and pipeline. Example: ctx.pipeline.id.

To reference a node in the pipeline, copy the Node ID from that node's properties. You can also use the tasks object to reference nodes and job results. Components with the standard output use the results object to store the results of the flow. For nonstandard outputs, you can also use results to retrieve customized outputs or variables set as output. When error handling is triggered, the error object can be used inside the Exception handler.

When an orchestration flow is created from a migrated sequencer job, DataStage-specific expressions need to be translated into CEL. Use the pipeline coding elements in the Expression Builder to replace functions and see examples of syntax differences in the following table.
Expression Description CEL DataStage
Logical operators a > b || c < 10 a > b OR c < 10
Ternary operator a > b ? 'A' : 'B' IF a > b THEN 'A' ELSE 'B'
String concatenation "prefix-" + parameter + "-suffix" "prefix-" : parameter : "-suffix"
String starts with param.startsWith('abc') Left(param,3) = 'abc'
Substring index param.indexOf('abc') Index(param, 'abc', 1)
String replace param.replace('he', 'we') Ereplace(param, "he", "we")
String lowercase param.lowerAscii() DownCase(param)
Is null param == null IsNull(param)