Data Transformation Engine Design Studio Tutorial

Chapter 7 - Using Cross-Referenced Data Creating the RegionReport Map
Design Studio Tutorial
162
Creating the RegionReport Map
Create an executable map called RegionReport to generate the
regionreport.txt output file. The regionreport.txt file will contain customer
records where each record contains the customer contact and the region.
Define the unique.txt contact file as the data source for input card #1.
Define the region.txt lookup file as the data source for input card #2.
In the map rule for the RegionReport data object on the output card:
Specify the generation of the F_MakeSalesRecord functional map.
Use the
LOOKUP function because the lookup file is not ordered in any specific
way.
Define the regionreport.txt as the data target.
Creating the F_MakeSalesRecord Functional Map
The two input objects for the F_MakeSalesRecord functional map are the
Contact group type from input card #1 and the Record group type from input
card #2.
Using the LOOKUP Function
Specify the LOOKUP function to sequentially search the series of contacts, and
return the first member of the series that meets a specified condition.
The
LOOKUP function has two arguments.
The first argument is the series of objects to search:
series_to_search
The series to search is the customer contacts, as represented by the Contact
group type on input card #1.
The second argument is the condition on which to base the search:
condition_to_evaluate
The condition to evaluate is whether the zip code of the record in the
region.txt lookup file is equal to the zip code of the contact in the unique.txt
file.
The
LOOKUP function returns the first object in the series if a corresponding
evaluation of the condition is TRUE. The syntax of the
LOOKUP function is:
LOOKUP (
series_to_search
,
condition_to_evaluate
)