Two stages of pre-processing are required:
Cleaning of the data, such as removal of records with no exposure and amalgamating multiple transactions on a single day into a single transaction
True pre-processing, such as rating factors dependent on multiple fields being pre-calculated
For example, a claims dataset (containing details of claims) that looks like: