Skip to main content

Reverse ETL for the code-first data stack

Project description

drt logo

drt — data reverse tool

Reverse ETL for the code-first data stack.

CI PyPI License Python

drt syncs data from your data warehouse to external services — declaratively, via YAML and CLI. Think dbt rundrt run. Same developer experience, opposite data direction.

# pip
pip install drt-core          # core (DuckDB included)
pip install drt-core[bigquery]  # + BigQuery

# uv (recommended)
uv add drt-core
uv add drt-core[bigquery]

drt init
drt run --dry-run
drt run

Why drt?

Problem drt's answer
Census/Hightouch are expensive SaaS Free, self-hosted OSS
GUI-first tools don't fit CI/CD CLI + YAML, Git-native
dbt/dlt ecosystem has no reverse leg Same philosophy, same DX
LLM/MCP era makes GUI SaaS overkill LLM-native by design

Quickstart

1. Install

pip install drt-core[bigquery]
# or
uv add drt-core[bigquery]

2. Initialize a project

mkdir my-drt-project && cd my-drt-project
drt init

This creates:

my-drt-project/
├── drt_project.yml   # project config
└── syncs/            # put your sync definitions here

drt init prompts for source type: bigquery, duckdb, or postgres.

3. Create a sync

# syncs/notify_slack.yml
name: notify_slack
description: "Notify Slack on new users"
model: ref('new_users')
destination:
  type: rest_api
  url: "https://hooks.slack.com/services/YOUR/WEBHOOK/URL"
  method: POST
  headers:
    Content-Type: "application/json"
  body_template: |
    { "text": "New user: {{ row.name }} ({{ row.email }})" }
sync:
  mode: full
  batch_size: 100
  rate_limit:
    requests_per_second: 5
  on_error: skip

4. Run

drt run --dry-run        # preview, no data written
drt run                  # run all syncs
drt run --select notify_slack  # run one sync
drt status               # check recent sync results

CLI Reference

drt init                    # initialize project
drt list                    # list sync definitions
drt run                     # run all syncs
drt run --select <name>     # run a specific sync
drt run --dry-run           # dry run
drt run --verbose           # show row-level error details
drt validate                # validate sync YAML configs
drt status                  # show recent sync status
drt status --verbose        # show per-row error details
drt mcp run                 # start MCP server (requires drt-core[mcp])

MCP Server

Connect drt to Claude, Cursor, or any MCP-compatible client so you can run syncs, check status, and validate configs without leaving your AI environment.

pip install drt-core[mcp]
drt mcp run

Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "drt": {
      "command": "drt",
      "args": ["mcp", "run"]
    }
  }
}

Available MCP tools:

Tool What it does
drt_list_syncs List all sync definitions
drt_run_sync Run a sync (supports dry_run)
drt_get_status Get last run result(s)
drt_validate Validate sync YAML configs
drt_get_schema Return JSON Schema for config files

AI Skills for Claude Code

Install the official Claude Code skills to generate YAML, debug failures, and migrate from other tools — all from the chat interface.

Install via Plugin Marketplace (recommended)

/plugin marketplace add drt-hub/drt
/plugin install drt@drt-hub

Tip: Enable auto-update so you always get the latest skills when drt is updated: /plugin → Marketplaces → drt-hub → Enable auto-update

Manual install (slash commands)

Copy the files from .claude/commands/ into your drt project's .claude/commands/ directory.

Skill Trigger What it does
/drt-create-sync "create a sync" Generates valid sync YAML from your intent
/drt-debug "sync failed" Diagnoses errors and suggests fixes
/drt-init "set up drt" Guides through project initialization
/drt-migrate "migrate from Census" Converts existing configs to drt YAML

Connectors

Type Name Status Install
Source BigQuery ✅ v0.1 pip install drt-core[bigquery]
Source DuckDB ✅ v0.1 (core)
Source PostgreSQL ✅ v0.1 pip install drt-core[postgres]
Source Snowflake 🗓 planned pip install drt-core[snowflake]
Source Redshift 🗓 planned pip install drt-core[redshift]
Source MySQL 🗓 planned pip install drt-core[mysql]
Destination REST API ✅ v0.1 (core)
Destination Slack Incoming Webhook ✅ v0.1 (core)
Destination GitHub Actions (workflow_dispatch) ✅ v0.1 (core)
Destination HubSpot (Contacts / Deals / Companies) ✅ v0.1 (core)
Destination Google Sheets 🗓 v0.4 (core)
Destination Salesforce 🗓 planned (core)
Destination Notion 🗓 planned (core)
Destination Linear 🗓 planned (core)
Destination SendGrid 🗓 planned (core)

Roadmap

Version Focus
v0.1 BigQuery / DuckDB / Postgres sources · REST API / Slack / GitHub Actions / HubSpot destinations · CLI · dry-run
v0.2 Incremental sync (cursor_field watermark) · retry config per-sync · 53 tests
v0.3 MCP Server (drt mcp run) · AI Skills for Claude Code · LLM-readable docs · row-level errors
v0.4 Dagster / Airflow integration · Google Sheets connector · Snowflake source
v1.x Rust engine (PyO3)

Ecosystem

drt is designed to work alongside, not against, the modern data stack:

dlt (load) → dbt (transform) → drt (activate)

Contributing

See CONTRIBUTING.md.

Disclaimer

drt is an independent open-source project and is not affiliated with, endorsed by, or sponsored by dbt Labs, dlt-hub, or any other company.

"dbt" is a registered trademark of dbt Labs, Inc. "dlt" is a project maintained by dlt-hub.

drt is designed to complement these tools as part of the modern data stack, but is a separate project with its own codebase and maintainers.

License

Apache 2.0 — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

drt_core-0.3.3.tar.gz (61.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

drt_core-0.3.3-py3-none-any.whl (46.9 kB view details)

Uploaded Python 3

File details

Details for the file drt_core-0.3.3.tar.gz.

File metadata

  • Download URL: drt_core-0.3.3.tar.gz
  • Upload date:
  • Size: 61.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for drt_core-0.3.3.tar.gz
Algorithm Hash digest
SHA256 c37cb184b5df831de5e33b7072e02945d0e643ddf130540a16b8c30b1fbfb1ef
MD5 fb8133253e38cc43520dfd7a7b5fc55d
BLAKE2b-256 e4734d590e130232e08daff3d9447a5c3442885d8e13f72b4b30af48d346e6fc

See more details on using hashes here.

Provenance

The following attestation bundles were made for drt_core-0.3.3.tar.gz:

Publisher: publish.yml on drt-hub/drt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file drt_core-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: drt_core-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 46.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for drt_core-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 83b5e35fbc52e15dc0dcab823f21787812e4aad11790ec947134bbfc73a0d534
MD5 038d8b9be3a4d4ed06e43e51c587958b
BLAKE2b-256 9f2077b66ddb372f443b9cc6995489072723901d39ec302d9b1e93af9d4fa00b

See more details on using hashes here.

Provenance

The following attestation bundles were made for drt_core-0.3.3-py3-none-any.whl:

Publisher: publish.yml on drt-hub/drt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page