Skip to content

Add Databricks, Trino, DuckDB connectors and Teams/PagerDuty alerts#11

Merged
harishconti merged 1 commit intomainfrom
claude/fix-bugs-implement-features-YCIoU
Apr 5, 2026
Merged

Add Databricks, Trino, DuckDB connectors and Teams/PagerDuty alerts#11
harishconti merged 1 commit intomainfrom
claude/fix-bugs-implement-features-YCIoU

Conversation

@Sruthi-ng
Copy link
Copy Markdown

What does this PR do?

Adds three new warehouse connectors (Databricks, Trino, DuckDB) and two new alert channels (Microsoft Teams, PagerDuty). Enhances the Slack dispatcher with Block Kit formatting and retry logic. Adds CLI commands for config validation and scheduler job inspection. Improves alert routing and per-table enable/disable flags.

Type of change

  • New connector
  • New alert channel
  • Bug fix
  • Documentation
  • Other (CLI enhancements, alert improvements)

Key Changes

New Connectors

  • Databricks (connectors/databricks.py): Connects to Databricks SQL warehouses via the official databricks-sql-connector. Supports Unity Catalog (three-part names) and legacy Hive metastore. Includes schema introspection via information_schema.columns with fallback to DESCRIBE TABLE.
  • Trino (connectors/trino.py): Connects to Trino/Presto clusters. Supports all Trino catalogs (Iceberg, Hive, Delta Lake, etc.). Uses trino-python-client with optional basic auth.
  • DuckDB (connectors/duckdb.py): Embedded analytical database connector for local files and in-memory databases. Useful for dbt-core development and reading Parquet/Iceberg files directly.

New Alert Channels

  • Microsoft Teams (alerts/teams.py): Sends alerts via Teams Incoming Webhooks using Adaptive Cards.
  • PagerDuty (alerts/pagerduty.py): Sends alerts via PagerDuty Events API v2 with severity mapping, deduplication keys, and incident resolution support.

Alert Improvements

  • Slack (alerts/slack.py): Refactored to use Block Kit structured layouts with severity colour strips, context footers, and action buttons. Added retry logic with exponential backoff for HTTP 429 and 5xx errors.
  • Alert factory (alerts/base.py): Updated to support Teams and PagerDuty dispatchers.

CLI Enhancements

  • Config validation (cmd_validate_config): New observakit validate-config command to dry-run parse kit.yml and contracts without connecting to a warehouse. Validates required fields, alert routing, and contract syntax.
  • JSON output (cmd_status, cmd_check): Added --output json flag for machine-readable status and check results.
  • Scheduler inspection (backend/scheduler.py, backend/main.py): New GET /scheduler/jobs endpoint to list all scheduled jobs with next run times.

Configuration & Robustness

  • Per-table enable flag: Added enabled: true/false field to freshness and volume table configs to skip checks without error.
  • Connector registration: Updated connectors/base.py to register new connectors (DuckDB, Trino, Databricks).
  • Package discovery: Updated pyproject.toml to include all package directories in setuptools discovery.

Testing

  • Added comprehensive unit tests for Teams and PagerDuty dispatchers in tests/test_alerts.py.
  • Existing tests pass; new connector and alert tests cover success paths, error handling, and configuration validation.

Related issues

N/A

https://claude.ai/code/session_01SWgQhZuNgDNhVBTUoXJa2x

…0→P2)

P0 bugs fixed:
- pyproject.toml: add [tool.setuptools.packages.find] to fix flat-layout discovery
  error that blocked `pip install`; fix deprecated license table format
- webhooks.py: fix SlackDispatcher(config) call bug — constructor takes **kwargs not config dict

P1 features:
- CLI: add `observakit validate-config` (dry-run parse of kit.yml + contracts)
- CLI: add `observakit diff` (fetch schema diff, exit 1 when drift detected for CI gates)
- CLI: add `--config` flag to all commands, `--output json` on status/check
- CLI: enforce exit codes (0=pass, 1=failures, 2=config error)
- Backend: add `GET /scheduler/jobs` endpoint listing next run times per job

P2 features:
- Scheduler: honor per-check `enabled: false` flag in freshness and volume loops
- Alerts: add alerts/teams.py (MS Teams Adaptive Cards via Incoming Webhook)
- Alerts: add alerts/pagerduty.py (PagerDuty Events API v2 with dedup key + resolve)
- Alerts: register teams + pagerduty in get_alert_dispatcher() factory
- Alerts: upgrade alerts/slack.py to Block Kit layout (header, context, action button)
  with severity colour strip and retry on 429/5xx
- Alerts: fix webhook.py version string (0.1.7 → 0.1.10)

P3 connectors:
- connectors/duckdb.py — embedded DuckDB for local/Parquet pipelines
- connectors/databricks.py — Databricks SQL Connector (Unity Catalog support)
- connectors/trino.py — Trino/Presto federated query connector
- connectors/base.py: register all three in get_warehouse_connector() factory
- pyproject.toml: add duckdb, databricks, trino optional extras

Tests:
- tests/test_alerts.py: add 11 new tests covering Teams, PagerDuty, Slack Block Kit;
  94 tests total, all passing

https://claude.ai/code/session_01SWgQhZuNgDNhVBTUoXJa2x
@harishconti harishconti merged commit 196063f into main Apr 5, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants