Schedules as Code

What are Paradime YAML-Based Schedules?

Paradime YAML schedules are configuration-as-code definitions, allowing you to define, version, and manage your data pipeline schedules directly within your dbt project repository. These schedules are configured in a single file named paradime_schedules.yml located in the root directory of your dbt project (alongside dbt_project.yml).

circle-exclamation

Prerequisites

File Location and Structure

your-dbt-project/
β”œβ”€β”€ dbt_project.yml
β”œβ”€β”€ paradime_schedules.yml    # All schedules must be defined here
β”œβ”€β”€ models/
β”œβ”€β”€ tests/
└── ...

Why Use YAML-Based Schedules?

  1. Version Control

    • Schedule configurations are tracked alongside your dbt models

    • Review schedule modifications through Pull Requests

    • Enforce team review processes for schedule changes

  2. Infrastructure as Code

    • Schedules are treated as code, not just UI configurations

    • Easy replication across environments

    • Enables automated deployment pipelines

  3. Team Collaboration

    • Simplified schedule review process

    • Standard formatting and validation

    • Documentation lives with the code

How YAML-bases schedules are deployed?

Schedules are always read from the paradime_schedules.yml file on your default branch (usually main or master).

  • Automatic Refresh: Paradime checks for changes every 10 minutes.

  • Manual Refresh: For immediate updates, navigate to the Bolt interface and click Parse Schedules.

circle-info

πŸ’‘ Note: To update your schedules, make sure to merge your changes to the default branch first.


Configuration Reference

This section describes the YAML configuration format for scheduling and managing automated tasks. The configuration supports various execution modes including scheduled runs, trigger-based execution, deferred scheduling, CI/CD integration and API.

circle-info

πŸ’‘ Looking for complete examples? Jump to the Example Configurations section below.

Base Configuration

Every scheduler configuration must include these basic fields:

Execution Modes

1. Schedule-Triggered Execution

Basic scheduled execution using cron expression:

2. Run Completion Trigger

Triggers execution based on completion of another job:

3. Merge Trigger

Triggers execution on merge events:

circle-exclamation

4. Deferred Scheduling

Allows schedules to used dbt defer to artifacts comparison:

5. Turbo CI Configuration

Configuration for CI pipelines:

6. API Configuration

Basic configuration when triggering Bolt via API:

circle-info

For more details on Paradime APIs check our Developers guide.

7. Suspended State

Configuration for suspended jobs:

Notifications Configuration

Notifications can be configured for various events through multiple channels:

circle-info

For Slack and MS Teams notifications, check our integrations guide:

Example: Complete Configuration


Best Practices

Schedule Format

  • Use standard cron expressions for scheduling

    • βœ… Standard cron to define days 0-6

      • 10 * * * 0-6 : At minute 10 on every day-of-week from Sunday through Saturday.

    • ❌ Non-standard cron to define days 1-7

      • 10 * * * 1-7 : At minute 10 on every day-of-week from Monday through Sunday

  • Use 'OFF' to disable scheduled execution

  • Use crontab.guruarrow-up-right to validate your cron expressions

SLA Configuration

  • sla_minutes should be set based on job complexity

    Consider dependencies when setting SLA

  • Recommended minimum: 30 minutes

Notification Configuration

  • Configure at least one notification channel

  • Include critical events (failed, SLA) in notifications

  • Use team channels for collaborative workflows

  • Make sure to set the Slack / MS Teams Channel or Email for System notifications. Check our guide here for Notifications Settingss


Paradime schedules terminal commands

Before running any of the following commands, navigate to your dbtℒ️ project directory where paradime_schedules.yml is located.

CLI command
Description

Validate File Format - This command checks the paradime_schedules.yml for formatting errors and outputs the result.

Run Schedule Locally - To run all defined schedules based on your local context: (ie. based on your development environment and your current branch).

Run Selected Schedule Locally - To run the named schedule based on your local context: (ie. based on your development environment and your current branch).

Dry run - To simulate all schedule executions without running dbtℒ️ models.

Dry run - To simulate the named schedule executions without running dbtℒ️ models.

Last updated

Was this helpful?