How to log the rejected records while migrating the data

Hi ,

We have migrated the data from DB2 to MySQL AWS cloud. For 1 table there were duplicaate records in DB2 as there were no primary keys or index keys deifned. But we have set composite keys in cloud DB. While migrating the duplicate records were not migrated.
Is there a way to capture/log the rejected records while data migration.

Thank you