As you extract records from a data source and load them into a data target, a variety of record logging options are available. For example, you can log records that are rejected as duplicates, or records that are rejected due to format errors or when a field is truncated. The rejected records are written to a log file which can be used as input for another process. As this technique demonstrates, you can also write reports against these log files.
This technique is divided into two parts. In the first part, we create the log file; in the second, we view the records in the log file.
In the following example, we retrieve records from DMSALE, which contains sales representative information. The data source contains duplicate records, and these are rejected and written to a log file.
The location for the rejected records file is specified in the Record Logging tab of the target object, and we use the default, which will be dmxduplg_dupl. This allows us to easily display the records in the log file, which we do in the second part of the technique.
Refer to the sample data flow DMDUPLG for the complete example.
In the DMC:
The Column Selection window opens.
This will create one row for each unique combination of SALESREP and PLANT.
Note: When you save, you will get a message warning you that the flow is incomplete since you have not defined a target. Save the flow anyway.
Note that the rejected duplicates will be written to dmxduplg_dupl.ftm in the application directory you select for the target.
The Transformations window opens.
The log of the data flow shows that 148 rows were processed, 126 rows were accepted and inserted into the data target, and 22 rows were rejected because of duplicates. The following image shows the log.
After the DMXDUPS data flow created in the last example has run:
The records that are displayed in the following image are the 22 duplicate records that were rejected and placed in the dmxduplg_dupl log file.
Note: Your order may differ.
iWay Software |