How can I validate the data prior inserting into staging table using DMF? Version - AX 2012 R3

Hi,

I am trying to import some Vendor related data from an Excel CSV file using DMF into AX custom table. I have all the entity set up that is working as expected and I see the records are being inserted into the target table. I also, have validation in place to validate if the VendId (vendor) is valid while copying the data to target and the validation works as expected (I put the validation code in the targetatable.validateWrite() method). But I would also like to restrict the invalid vendor data right at the moment of writing the data into the staging table. I am figure out how can I prevent record(s) that are coming from a Excel CSV file that aren’t valid (f the Vendor is not a valid vendor) while inserting the data into the staging. I just overwrote the ValidateWrite() method on the staging table and just put a debugger to see if it hits the breakpoint while debugging for me to put the validation logic there but it didn’t. Seems like the writing process to staging table doesn’t have the have similar process like when copying the data from staging to the target.

Can anybody provide some inputs on how/where I can put some validation logic while copying (writing) the CSV files data to the staging table?

Thanks!