Data Transformation Engine Design Studio Tutorial

Chapter 5 - Using the EXTRACT Function Entering a Map Rule to Extract Specific Records
Design Studio Tutorial
121
Entering a Map Rule to Extract Specific Records
To map only the contacts that have Florida addresses, use the EXTRACT function
on the Contact:ContactFile data object specified in the map rule that calls the
F_MakeLabels functional map.
Currently, the F_MakeLabels functional map is used to map every contact to a
label. By using the
EXTRACT function in the call to the functional map, the
F_MakeLabels functional map will map only those records meeting the
EXTRACT
specifications.
Card Naming Conventions
Assigning a meaningful name to the output card is a good habit to develop. The
purpose of the LabelFile output card is to generate a file that extracts the contact
records with Florida addresses.
Change the name of the LabelFile output card on the FloridaLabels map to
FloridaLabelsOut.
In this exercise, the
EXTRACT function is used so that FloridaLabels maps only
the contacts that have the value FL in the State Field.
The
EXTRACT function selects, from a series of objects of some type, all objects
that meet a particular condition. The syntax of the
EXTRACT function is:
EXTRACT (
objects_to_extract
,
condition_to_evaluate
)
The EXTRACT function has two arguments:
The first argument is the series to be evaluated:
objects_to_extract
The second argument is the condition:
condition_to_evaluate
EXTRACT returns the data objects of the first argument if a corresponding
evaluation of the second argument is TRUE.
For our purposes, the objects are extracted from the contact records. The
condition to evaluate is whether the state is Florida.
In the FloridaLabels map, the map rule containing the call for the functional map
is on the Label data object.
Note The map rules are shown in a floating Rule Bar.