Process Flow - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905
This is a logical flow, not a physical reenactment of how Vantage processes a trigger:
  1. The triggering event occurs on the subject table.
  2. Vantage determines whether triggers defined on the subject table are to become active on a triggering event.
  3. Vantage determines whether qualified triggers are defined to fire before or after the triggering event.
  4. Multiple qualified triggers typically fire in the ANSI-specified order of creation timestamp.

    To override the creation timestamp and specify a different execution order of triggers, you can use the ORDER clause, a Teradata extension.

    Even if triggers are created without the ORDER clause, you can redefine the order of execution by changing the trigger creation timestamp using the ALTER TRIGGER statement.

  5. The triggered SQL statements (triggered action) run.
    If the trigger definition uses a REFERENCING clause to specify that old, new, or both old and new data for the triggered action is to be collected under a correlation name (an alias), then that information is stored in transition tables or transition rows:
    • OLD [ROW] values under old_transition_variable_name, NEW [ROW] values under new_transition_variable_name, or both.
    • OLD TABLE set of rows under old_transition_table_name, NEW TABLE set of rows under new_transition_table_name, or both.
    • OLD_NEW_TABLE set of rows under old_new_table_name, with old values as old_transition_variable_name and new values as new_transition_variable_name.
  6. The trigger passes control to the next trigger, if defined, in a cascaded sequence. The sequence can include recursive triggers.

    Otherwise, control passes to the next statement in the application.

  7. If any of the actions involved in the triggering event or the triggered actions abort, then all of the actions are aborted.