What is the best method to parse events in daily batches from external source (csv file) that produces entries in a separate table if any of a multiple of conditions are met. Conditions can vary through time and need to maintain certain level of flexibility. They are simple conditions though, either a field is equal, starts or contains certain strings.
What I envision is 2 tables, first table to import the external data, and a second to keep a partial record of the event with some type of rating depending on what condition was met. My question revolves on how to accomplish filling one with the other. My first thought was to add a trigger on the conditions in the first table that inserts values on the second. Another thought was to run a scheduled query on the first table, sometime after the daily upload, that inserts into the second table. The first method using triggers sounds like it would be onerous to maintain and change according to the requirements. The second seems like more overhead as it would be running to scheduled procedures, one to upload and the second to fill the second table.
Any thoughts are welcome. Nothing has been built at this point except the format in which the .CSVs will be received. Thank you for reading my post and to all who contribute.