How to validate data from a temporary table imported to definitive

Hello my friends!

I’m doing a generalized import of data to a temporary table and I want to do some validations such as the existence of some information in certain tables and then import this data.
In my research I saw a lot of use of backend routines but I couldn’t understand how it would scan the entire temporary table to insert it!?
If you have any ideas to suggest, I’d really appreciate it!

Sorted out!

I’m posting here because it might help other people with the same doubt.

backend was used

I import an untreated CSV into a temporary table

End of frontend processes

Starting the backend

All fields are text type

Valid if there is no longer a person with the same CPF

I hope it helps!