Procedure
-
Double-click the first tFileOutputDelimited component to display its Basic settings.
-
In the File Name field, specify
the path and name of the file to write with the valid data.
-
Define the row and field separators in the corresponding
fields.
-
Select the Include Header check
box to include column headers in the output data.
-
Repeat the steps above on the second tFileOutputDelimited component to configure the output of the
rejected data.
-
Double-click the tJava component
to display its Basic settings.
-
In the Code field, type in the
code that will display the number of updated, inserted and rejected lines
processed:
System.out.println("Valid data: "+((Integer)globalMap.get("tFileOutputDelimited_1_NB_LINE"))+"\nRejected
data: "+((Integer)globalMap.get("tFileOutputDelimited_2_NB_LINE")));
-
Save your Job and press F6 to
execute it.
Results
Valid data is outputted in the first delimited file and rejects to the
second, and the console displays the number of valid lines and the number of rejects
processed in the Job.