dbt Jobs
Quick Summary
dbt jobs schedule dbt commands on a cron. They run against the container image built at deploy time, with warehouse credentials injected at runtime. Jobs are created and managed through the web UI.
Recommended Settings
| Setting | Recommended | Why |
|---|---|---|
| Command | dbt build |
Runs models and tests together in dependency order |
| Schedule | Match your source data cadence | No point running more frequently than your sources update |
| Slack Alerts | Enabled on failures | Know immediately when production data is broken |
Key Takeaways
- ✅
dbt buildis the default command — it runs models, tests, snapshots, and seeds in dependency order in a single pass - ✅ Jobs run from the image built at deploy time — to pick up code changes, create a new plan first
- ✅ Environment variables are injected at runtime — warehouse credentials never live in your container image
Available Commands
| Command | What it does |
|---|---|
dbt build |
Runs models, tests, snapshots, and seeds in dependency order. Recommended default. |
dbt run |
Executes models only. Does not run tests. |
dbt test |
Runs tests only against already-materialized models. |
dbt snapshot |
Executes snapshot models only. |
dbt seed |
Loads CSV seed files into your warehouse. |
Creating a dbt Job
- Navigate to your project in the dagctl web UI
- Click the Jobs tab
- Click Create Job
- Select the dbt command to run
- Set the cron schedule (e.g.,
0 * * * *for hourly) - Optionally configure Slack alerts for failures
- Click Save
The job starts executing on its next scheduled trigger. You can also trigger a manual run from the Jobs tab.
How Execution Works
When a job triggers:
- Kubernetes creates a Job in your organization's namespace
- Kyverno intercepts pod creation and mutates the pod spec: - Injects warehouse credentials from your organization's Secrets - Mounts the git-sync init container to clone your repository - Sets resource limits from project configuration
- The
git-syncinit container clones your repository at the pinned commit - The main container executes the configured dbt command
- Job Watcher monitors the Kubernetes Job, parses execution output, and reports status back to the control plane
- Results are visible in the web UI with full logs
Warning
Jobs run against the container image from your last successful plan. If you push code changes without creating a new plan, the scheduled job will still run against the old image.
Slack Alerts
Configure Slack alerts under Settings → Integrations → Slack. Once connected, you can enable failure notifications per job. Alerts fire when a job exits with a non-zero status.
Next Steps
- Deploy code changes to pick up model updates — dbt Plans
- Monitor job execution and logs — Observability