Configure your map to filter records from an input file and write the result to three
different outputs.
Procedure
-
Drag the input
order
element to the output
APACRecord
, EMEARecord
and
USRecord
elements.
-
Click the
APACRecord
element and drag and drop an
Equal function from the Functions
tab on the Filter argument of the
SimpleLoop.
-
Drag and drop the input
region
element on the First
Value argument.
-
Drag and drop a Constant
function on the Second Value argument,
then double-click it and enter APAC in
the Value field.
With this filter, the
APAC
output will only contain records in which the value for the
region
element is
APAC.
-
Right-click the Equal
function and click Copy then right-click the Filter argument in the
EMEARecord
element and click Paste.
This allows you to copy and paste the function and its
arguments.
-
Change the value for the Constant function to
EMEA, and repeat the same steps for the
USRecord
element.
-
Save your map and open your Job in the Integration
perspective to run it.
Results
When running the Job using the sample XML
input, you should get three output files with the following
content:
orderId;lastName;firstName;region
l7xZ4P;George;Harding;APAC
wZlWOj;William;Quincy;APAC
orderId;lastName;firstName;region
vF7lNh;Bill;Madison;EMEA
orderId;lastName;firstName;region
ih3fPC;Chester;Harding;US
dTTrNO;Abraham;Roosevelt;US