Data Transformation Engine Map Designer Reference Guide
Chapter 8 - Functional Map Basics Two Kinds of Maps
Map Designer Reference Guide
140
Ask yourself “how many CarRecord(s) do I want to generate?” If you want a
specific number, the answer would be that number. To generate two
CarRecord(s), index two occurrences of CarRecord, expand each occurrence,
and map to its components. For more information on indexing, see the Indexing
an Output section.
If the number of CarRecord(s) is based on the number of FixedRecord(s) in
the input, generate one CarRecord for each FixedRecord. So, the answer to
your question of how many CarRecord(s) to generate is, “As many as there are
FixedRecord(s) in the input.”
Note When you see an output group with a range, it is always a good idea to stop and
ask yourself, “How many of these do I want to generate?” The answer will either
be:
# A specific number - index the output.
or
# The number is based on the number of some input - use a functional map.
You need a mechanism that takes a single FixedRecord and creates a single
CarRecord. To do this, create a functional map, which is similar to a user-defined
function. This functional map maps a single FixedRecord to a single CarRecord.
The map is called for every occurrence of a FixedRecord in the input. This
generates exactly one CarRecord for each FixedRecord. For example, if there
are 23 FixedRecord(s), 23 CarRecord(s) are generated. The first CarRecord
corresponds to the first FixedRecord. The second CarRecord corresponds to the
second FixedRecord, and so on.
Two Kinds of Maps
There are two kinds of maps: executable maps and functional maps.
♦ Executable Map
An executable map is a map responsible for the totality of your inputs and
outputs. The sources and targets of an executable maps are entire files,
database tables, messages, applications, and so on. Think of an executable
map as the main map, the top-level map. Executable maps are compiled and
run.
In the Navigator, the icon for an executable map is blue
.
In the previous example, the map that takes the input file of car statistics and
maps it to the output file is an executable map.