Oracle Analytics Forum

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Triggers being triggered by Data Flow "Save Data" to Database Table - How many times?

Received Response
9
Views
1
Comments
AlanMacNeill
AlanMacNeill Rank 3 - Community Apprentice

Question about saving data from DV via the Save Data to an existing Database Table with a trigger set on it:

Let's say you're writing a data flow dataset that will ultimately write 50 records to a table "TBL_SENT_FILES". That table has an after insert trigger on it to do some sort of task.

Will that trigger trigger once, or will it trigger 50 times?

Answers

  • You mean for a dataflow that will incrementally add data or replace the whole content?
    You may want to enable auditing on your database and carefully analyse how it is performed…

    When replacing all the data in the table, the table is dropped, your trigger will be lost in the drop, a temporary table is created and finally renamed (at least last time I looked at it a year ago it was like this).

    Incremental insertion I didn't check, but seeing how "unfriendly" the first test was, I can only highly encourage you to fully audit that process once to be sure of what's going on exactly (if you have an Oracle database, with unified auditing it is extremely easy to get a full list of what is performed on the table).