Data Transformation Engine Functions and Expressions Reference Guide

Chapter 1 - Expressions and Evaluations Map Names in Expressions
Functions and Expressions Reference Guide
35
Note Unlike a function, a map cannot be used as an argument to an operator or another
map. A map may be used as an argument to a function only if the output of the
map evaluates directly to output data objects. For example,
Valid: IF ( A > 10 , BigMap ( X ) , LittleMap ( Y ) )
Not valid: IF ( FunnyMap ( A ) , "2" , "3" )
Evaluation of Functional Maps in an Expression
A single evaluation of a functional map requires one object for each input
argument. The result of the evaluation is always one output object. As with
functions and operators, when a functional map is used in an expression,
evaluation sets for that expression may cause the functional map to be evaluated
many times.
Consider the following expression:
MakeForm ( EntryForm:Input , GroupInfo:Input )
If there are two occurrences of GroupInfo and four occurrences of EntryForm,
the map MakeForm will be evaluated once per combination of EntryForm and
GroupInfo—a total of (2 x 4) = 8 times.
Consider another expression:
Fmap ( a:Input , b:Input , c:Input )
The objects a, b, and c have only Input in common. The expression that contains
the Fmap reference will be evaluated once per combination of a, b, and c.
To illustrate how the functional map will be evaluated, use a very simple data file
of a’s, b’s, and c’s. Each time the map is evaluated, one a object, one b object,
and one c object are selected. The first time the map is evaluated, the data
objects are a1, b1, and c1. The next time it is evaluated, the data objects are a2,
b1, and c1, and so on.
An important difference in how the Map Designer evaluates a functional map in an
expression is when an input argument evaluates to NONE.
See the section When an Input Argument of a Functional Map Evaluates to NONE
in this chapter.