Table of Contents

Search

  1. Preface
  2. The Transformation Language
  3. Constants
  4. Operators
  5. Variables
  6. Dates
  7. Functions

Transformation Language Reference

Transformation Language Reference

Dot Operator

Dot Operator

Use a dot operator to access an element in a struct. You can also use a dot operator in an array of structs to access elements from each struct in the array.

Syntax

To access an element in a struct, use the following syntax:
struct.element
To access an element in an array of structs, use the following syntax:
array_of_structs.element
The following table describes the arguments in the syntax:
Argument
Description
struct
Struct. The struct from which you want to access an element. You can enter any valid transformation expression that evaluates to a struct.
array_of_structs
Array with struct elements. The array from which you want to access elements in each struct. You can enter any valid transformation expression that evaluates to an array.
element
The name of the struct element that you want to access.

Return Value

If you use the dot operator on a struct, the expression returns the element in the struct. The return type is the same as the data type of the element in the specified struct.
If you use the dot operator on an array of structs, the expression returns an array that contains the specified element in each struct.

Nulls

If the element in the struct has a NULL value, the expression returns NULL.
If the struct is NULL, the expression returns NULL.

Examples

You have the following struct:
location{ street: NULL city : 'NEWYORK' state: 'NY' zip : 12345 }
The following expressions use a dot operator to access elements in the struct:
Input Value
RETURN VALUE
location.street
NULL
location.city
'NEWYORK'
location.state
'NY'
location.zip
12345
You can also use a dot operator to access elements in an array of structs.
For example, you have the following array with three elements of type struct and each struct has three elements:
employee_info_array = [ derrick_struct{ name: 'Derrick' city: NULL state: 'NY' }, kevin_struct{ name: 'Kevin' city: 'Redwood City' state: 'CA' }, lauren_struct{ name: 'Lauren' city: 'Woodcliff Lake' state: NULL } ]
The following expressions use a dot operator to access the string elements in each struct of the array:
Input Value
RETURN VALUE
employee_info_array.name
['Derrick','Kevin','Lauren']
employee_info_array.city
[NULL,'Redwood City','Woodcliff Lake']
employee_info_array.state
['NY','CA',NULL]

0 COMMENTS

We’d like to hear from you!