Toggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage


Routines in Sundeck contain multiple Hooks and serve as containers for organizing them. When a Routine is triggered, all the Hooks it contains are evaluated. This setup allows you to define blocks of Hooks that will only be activated under specific conditions. By using Routines, you can streamline the configuration of the Sundeck Broker and make it easier to understand.

Routines just like system-defined hooks can fire before the query is submitted or after the query runs.

DDL for creating routines

Sundeck UI

Routines can be created and viewed by either Sundeck DDL or the Sundeck UI. To modify or created Routines peform the following steps:

  1. Navigate to the Broker > Routines page.
  2. Use the Create Routine button.
  3. Name your Routine.
  4. Add Pre-Hooks and Post-Hooks the same way you would in the Broker Config page.
  5. Save the Routine.

Please refer to SQL below to make modifications to routines via Sundeck DDL.

To use a routine in the Sundeck UI:

  1. Create routine with either the Sundeck UI or Sundeck DDL.
  2. Go to the Broker > Config page.
  3. Click on + Add Pre-Hook link on the “Prior to Snowflake Submission” for routines and hooks.
  4. Find routine that was created in step #1 on the list of available hooks.
  5. Add it to the Broker Config and customize based on your needs.