Correlation names

A correlation name is a field reference that identifies a well-defined starting point in the logical message tree and is used in field references to describe a standard part of the tree format.

When you access data in any of the four trees (message, environment, local environment, or exception list), the correlation names that you can use depend on the node for which you create ESQL or mappings, and whether the node creates an output message. For example, a Trace node does not alter the content of the message as it passes through the node, but a Compute node can construct a new output message.

You can introduce new correlation names with SELECT expressions, quantified predicates, and FOR statements. You can create non-correlation names in a node by using reference variables.

Correlation names in nodes that do not create an output message

Most message flow nodes do not create an output message; all ESQL expressions that you write in ESQL modules or in mappings within these nodes refer to just the input message. You can use the following correlation names in Database and Filter (ESQL modules) nodes. You cannot use these correlation names in the expression of any mapping for a Mapping, Extract, Warehouse, DataInsert, DataUpdate, or DataDelete node.

Root
The root of the message passing through the node.
Body
The last child of the root of the message, that is the body of the message. This is an alias for Root.*[<].

For a description of how to use * see Using anonymous field references.

DestinationList
The structure that contains the current local environment variables available to the node. Its preferred name is LocalEnvironment, although the DestinationList correlation name can be used for backward compatibility.
Properties
The standard properties of the input message.
ExceptionList
The structure that contains the current exception list to which the node has access.
Environment
The structure that contains the current global environment variables available to the node. Environment can be read and updated from any node for which you can create ESQL code or mappings.
LocalEnvironment
The structure that contains the current local environment variables available to the node. LocalEnvironment can be read and updated from any node for which you can create ESQL code or mappings.

Correlation names in nodes that create an output message

If you are coding ESQL for a Compute node, the correlation names are different because there are two message trees involved: the input message and the output message. The correlation names in ESQL within these nodes are:

Environment
The structure that contains the current global environment variables available to the node. Environment can be read and updated.
InputRoot
The root of the input message.
InputBody
The last child of the root of the input message. This is an alias for InputRoot.*[<].

For a description of how to use * see Using anonymous field references.

InputProperties
The standard properties of the input message.
InputDestinationList
The structure that contains the local environment variables for the message passing through the node. Use the correlation name InputDestinationList for backward compatibility; if compatibility is not required, use the preferred name InputLocalEnvironment
InputExceptionList
The structure that contains the exception list for the message passing through the node.
InputLocalEnvironment
The structure that contains the local environment variables for the message passing through the node.
OutputRoot
The root of the output message.

In a Compute node, there is no correlation name OutputBody.

OutputDestinationList
The structure that contains the local environment variables being sent out from the node. Use the correlation name OutputDestinationList for backward compatibility; if compatibility is not required, use the preferred name OutputLocalEnvironment
OutputExceptionList
The structure containing the exception list that the node is generating.

While this correlation name is always valid, it has meaning only when the Compute Mode property of the Compute node indicates that the Compute node is propagating the ExceptionList.

OutputLocalEnvironment
The structure that contains the local environment variables being sent out from the node.

While this correlation name is always valid, it has meaning only when the Compute Mode property of the Compute node indicates that the Compute node is propagating the LocalEnvironment.