Prism
v0.1.9rc2
v0.1.9rc2
  • 👋Welcome to Prism!
  • Getting Started
    • Installation
    • Creating your first project
    • Why Prism?
  • Fundamentals
    • Tasks
      • tasks
      • hooks
        • hooks.sql
        • hooks.spark
        • hooks.dbt_ref
    • Targets
      • Multiple targets
    • Config files
      • prism_project.py
        • RUN_ID / SLUG
        • SYS_PATH_CONF
        • THREADS
        • PROFILE_YML_PATH / PROFILE
        • PRISM_LOGGER
        • TRIGGERS_YML_PATH / TRIGGERS
      • Profile YML
      • Triggers YML
    • Jinja
      • __file__ and Path
      • prism_project
      • wkdir
      • parent_dir
      • concat
      • env
  • Adapters
    • Overview
    • sql
      • BigQuery
      • Postgres
      • Redshift
      • Snowflake
      • Trino
    • PySpark
    • dbt
  • Agents
    • Overview
    • Docker
    • EC2
  • CLI
    • Command Line Interface
    • init
    • compile
    • connect
    • create
      • agent
      • task
      • trigger
    • graph
    • run
    • spark-submit
    • agent
      • apply
      • run
      • build
      • delete
  • Advanced features
    • Concurrency
    • Logging
    • Triggers
    • Retries
    • Python Client
  • API Reference
    • prism.task.PrismTask
    • @task(...)
    • @target(...)
    • @target_iterator(...)
    • tasks.ref(...)
    • hooks.sql(...)
    • hooks.dbt_ref(...)
  • Use Cases
    • Analytics on top of dbt
    • Machine Learning
  • Wiki
    • DAGs
Powered by GitBook
On this page
  1. Fundamentals
  2. Config files
  3. prism_project.py

TRIGGERS_YML_PATH / TRIGGERS

PreviousPRISM_LOGGERNextProfile YML

Last updated 1 year ago

Triggers allow users to run specific functions upon a project's success and/or failure. TRIGGERS_YML_PATH specifies the location of the triggers YML configuration file. This defaults to a file named triggers.yml in the project directory. TRIGGERS is a dictionary that specifies the triggers to run upon success and failure.

# prism_project.py
...
# Triggers
TRIGGERS_DIR = Path(__file__).parent  # location of triggers.yml file
TRIGGERS = {
    'on_success': [],  # triggers from triggers.yml to run on success
    'on_failure': [],  # triggers from triggers.yml to run on failure
}
...

The TRIGGERS dictionary has two acceptable keys: on_success, and on_failure. on_success, as the name suggests, refers to triggers to run on a successful project run. on_failure refers to triggers to run on a failed project run.

More information can be found in the section.

Triggers