Reverse ETL for the code-first data stack
drt syncs data from your data warehouse to external services โ declaratively, via YAML and CLI. Think dbt run โ drt run. Same developer experience, opposite data direction.
pip install drt-core # core (DuckDB included)
drt init && drt run
โ or try it in your browser, zero local setup.
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 |
What's always free? All connectors, CLI, MCP server, and sync engine. See OPEN_CORE.md for the open core boundary.
Quickstart
No cloud accounts needed โ DuckDB + httpbin.org, three commands.
pip install drt-core
mkdir my-drt-project && cd my-drt-project
drt init --template duckdbtorest
That scaffolds a runnable syncs/duckdbtorest.yml. Seed a tiny DuckDB table and run:
python -c "
import duckdb
c = duckdb.connect('warehouse.duckdb')
c.execute('''CREATE TABLE IF NOT EXISTS users AS SELECT * FROM (VALUES
(1, 'Alice', 'alice@example.com'),
(2, 'Bob', 'bob@example.com'),
(3, 'Carol', 'carol@example.com')
) t(id, name, email)''')
c.close()
"
drt run --dry-run # preview, no data sent
drt run # POST each row to httpbin.org
drt status # check results
Other starter templates
drt init --template list # see all available templates
drt init --template postgrestoslack
drt init --template duckdbtohubspot
Each template prints next-steps for the env vars / source data it needs. See examples/ for the full collection (Discord, Google Sheets, GitHub Actions, MySQL, ClickHouse, BigQuery, โฆ) and docs/connectors/ for per-connector reference.
Customizing your sync
For a guided wizard that walks you through profile + project setup:
drt init # interactive โ picks a source, configures profile, scaffolds project
Both flows produce the same project shape (drt_project.yml, syncs/, .drt/). drt sources --detailed and drt destinations --detailed print every connector's required env vars and a sample YAML stanza โ useful when hand-authoring beyond the templates.
CLI Reference
drt init # initialize project
drt list # list sync definitions
drt sources # list available source connectors
drt destinations # list available destination connectors
drt run # run all syncs
drt run --select <name> # run a specific sync
drt run --all # discover and run all syncs
drt run --select tag:<tag> # run syncs matching a tag
drt run --threads 4 # parallel sync execution
drt run --dry-run # dry run
drt run --verbose # show row-level error details
drt run --output json # structured JSON output for CI/scripting
drt run --log-format json # structured JSON logging to stderr
drt run --profile prd # override profile (or DRT_PROFILE env var)
drt run --cursor-value 'โฆ' # override watermark cursor for backfill
drt test # run post-sync validation tests
drt test --select <name> # test a specific sync
drt validate # validate sync YAML configs
drt status # show recent sync status
drt status --output json # JSON output for status
drt profile list # list credential profiles in ~/.drt/profiles.yml
drt profile show <name> # show a profile (secrets masked)
drt profile test <name> # verify a profile's source connectivity
drt profile add <name> # interactively add a profile
drt profile remove <name> # remove a profile
drt serve # start HTTP webhook endpoint
drt docs generate --format mermaid # print project DAG as Mermaid
drt mcp run # start MCP server (requires drt-core[mcp])
drt --install-completion # install shell completion (bash/zsh/fish)
drt --show-completion # show completion script
Visualize your syncs
Generate a Mermaid DAG from your local drt_project.yml and syncs/*.yml files:
drt docs generate --format mermaid > dag.md
graph LR
subgraph Sources
srcbigqueryprod["bigquery_prod<br/><i>bigquery</i>"]
end
subgraph Syncs
syncuserstohubspot{{"usersto_hubspot<br/><i>upsert</i>"}}
syncaccountstohubspot{{"accountsto_hubspot<br/><i>upsert</i>"}}
end
subgraph Destinations
dsthubspotcontacts["hubspot (contacts)<br/><i>hubspot</i>"]
end
srcbigqueryprod -->|extract| syncusersto_hubspot
srcbigqueryprod -->|extract| syncaccountsto_hubspot
syncuserstohubspot -->|load| dsthubspot_contacts
syncaccountstohubspot -->|load| dsthubspot_contacts
syncuserstohubspot -.lookup.-> syncaccountstohubspot
Shell completion
Shell completion is supported for bash, zsh, and fish:
# Recommended: auto-install for your current shell (idempotent)
drt --install-completion
Or manually add to your shell config (run once from the target shell)
drt --show-completion >> ~/.bashrc # bash
drt --show-completion >> ~/.zshrc # zsh
drt --show-completion > ~/.config/fish/completions/drt.fish # fish
Note:--show-completionoutputs the script for your current shell. Run it from the shell you want to configure. The manual>>append is not idempotent โ run it once only.
After installation, restart your shell and tab-complete commands and options.
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/claudedesktopconfig.json):
{
"mcpServers": {
"drt": {
"command": "drt",
"args": ["mcp", "run"]
}
}
}
Available MCP tools:
| Tool | What it does | | --------------------- | ------------------------------------------------------------------------------------- | | drtlistsyncs | List all sync definitions | | drtrunsync | Run a sync (supports dryrun + computediff for --diff parity) | | drtruntest | Run post-sync validation tests (mirrors drt test) | | drtgetstatus | Get last run result(s) | | drtgethistory | Get recent sync run history | | drt_validate | Validate sync YAML configs | | drtgetschema | Return JSON Schema for config files | | drtlistconnectors | List available sources and destinations | | drt_dlq | Inspect a sync's Dead Letter Queue (depth + failed records) | | drt_retry | Replay a sync's Dead Letter Queue (mirrors drt retry) | | drtgetmanifest | Machine-readable sync catalog + lineage (drt docs JSON) | | drtlistprofiles | List credential profiles (name + type, no secrets) | | drttestprofile | Connectivity check for a credential profile | | drt_doctor | Environment diagnostics (mirrors drt doctor) |
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 a specific error and suggests fixes | | /drt-troubleshoot | "drt isn't working" | Walks a full top-to-bottom diagnostic checklist | | /drt-init | "set up drt" | Guides through project initialization | | /drt-migrate | "migrate from Census" | Converts existing configs to drt YAML |
Connectors
Per-connector reference: docs/connectors/ ยท Discoverable from the CLI:drt sources --detailed/drt destinations --detailed
Sources
| Connector | Status | Install | Auth | | ---------- | --------- | ---------------------------------- | --------------------------------------------- | | BigQuery | โ
v0.1 | pip install drt-core[bigquery] | Application Default / Service Account Keyfile | | DuckDB | โ
v0.1 | (core) | File path | | PostgreSQL | โ
v0.1 | pip install drt-core[postgres] | Password (env var) | | Snowflake | โ
v0.5 | pip install drt-core[snowflake] | Password (env var) | | SQLite | โ
v0.4.2 | (core) | File path | | Redshift | โ
v0.3.4 | pip install drt-core[redshift] | Password (env var) | | ClickHouse | โ
v0.4.3 | pip install drt-core[clickhouse] | Password (env var) | | MySQL | โ
v0.5 | pip install drt-core[mysql] | Password (env var) | | Databricks | โ
v0.6 | pip install drt-core[databricks] | Access Token (env var) | | Delta Lake | โ
v0.8 | pip install drt-core[deltalake] | Storage options (env var) | | Iceberg | โ
v0.8 | pip install drt-core[iceberg] | Catalog properties (env var) | | SQL Server | โ
v0.6 | pip install drt-core[sqlserver] | Password (env var) | | REST API | โ
v0.7 | (core) | Bearer / API Key / Basic / OAuth2 |
Destinations
34 destinations โ warehouses, SaaS APIs, cloud storage, files & webhooks (click to expand)
| Connector | Status | Install | Auth | | ----------------------- | --------- | ---------------------------------- | --------------------------------- | | REST API | โ
v0.1 | (core) | Bearer / API Key / Basic / OAuth2 | | Slack Incoming Webhook | โ
v0.1 | (core) | Webhook URL | | Discord Webhook | โ
v0.4.2 | (core) | Webhook URL | | GitHub Actions | โ
v0.1 | (core) | Token (env var) | | HubSpot | โ
v0.1 | (core) | Token (env var) | | Zendesk | โ
v0.7 | (core) | Basic (email + API token) | | Amplitude | โ
v0.7 | (core) | Project API key (env var) | | Klaviyo | โ
v0.8 | (core) | Private API key (env var) | | Mixpanel | โ
v0.8 | (core) | Project token / service account | | Google Ads | โ
v0.6 | (core) | OAuth2 Client Credentials | | Google Sheets | โ
v0.4 | pip install drt-core[sheets] | Service Account Keyfile | | PostgreSQL (upsert) | โ
v0.4 | pip install drt-core[postgres] | Password (env var) | | MySQL (upsert) | โ
v0.4 | pip install drt-core[mysql] | Password (env var) | | ClickHouse | โ
v0.5 | pip install drt-core[clickhouse] | Password (env var) | | Parquet file | โ
v0.5 | pip install drt-core[parquet] | File path | | Amazon S3 | โ
v0.7.9 | pip install drt-core[s3] | AWS credential chain / env vars | | Google Cloud Storage | โ
v0.7.9 | pip install drt-core[gcs] | Application Default / Service Account Keyfile | | Azure Blob Storage | โ
v0.7.9 | pip install drt-core[azure] | Connection string env / DefaultAzureCredential | | Microsoft Teams Webhook | โ
v0.5 | (core) | Webhook URL | | CSV / JSON / JSONL file | โ
v0.5 | (core) | File path | | Jira | โ
v0.5 | (core) | Basic (email + API token) | | Linear | โ
v0.5 | (core) | API Key (env var) | | SendGrid | โ
v0.5 | (core) | API Key (env var) | | Notion | โ
v0.6 | (core) | Bearer Token (env var) | | Airtable | โ
v0.8 | (core) | Personal Access Token (env var) | | Twilio SMS | โ
v0.6 | (core) | Basic (Account SID + Auth Token) | | Intercom | โ
v0.6 | (core) | Bearer Token (env var) | | Email SMTP | โ
v0.6 | (core) | Username / Password (env var) | | Salesforce Bulk API 2.0 | โ
v0.6 | (core) | OAuth2 (username-password) | | Staged Upload | โ
v0.6 | (core) | Configurable per provider | | Elasticsearch / OpenSearch | โ
v0.7.9 | (core) | API key / HTTP Basic (env var) | | Snowflake | โ
v0.7 | pip install drt-core[snowflake] | Password (env var) | | Databricks Delta Lake | โ
v0.7.9 | pip install drt-core[databricks] | Personal Access Token (env var) | | BigQuery | โ
v0.8 | pip install drt-core[bigquery] | ADC / Service Account keyfile |
Integrations
| Connector | Status | Install | | ------------------- | ------- | ------------------------- | | Dagster | โ
v0.4 | pip install dagster-drt | | Prefect | โ
v0.6 | (core) | | Airflow | โ
v0.6 | (core) | | dbt manifest reader | โ
v0.4 | (core) |
Roadmap
Upcoming releases โ ROADMAP.md (scope, themes, targets)
Issue-level tracking โ GitHub Milestones
Looking to contribute? โ Good First Issues
Shipped: now on v0.7.10 โ co-writer-safe mirror ยท Delta Lake + Iceberg sources ยท PII masking ยท Klaviyo + Airtable ยท VS Code extension. Grouped milestones below; the full per-release changelog lives in CHANGELOG.md and GitHub Releases.
| Milestone | Highlights | | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | v0.1โ0.3 | Core CLI ยท BigQuery / DuckDB / Postgres sources ยท REST / Slack / HubSpot destinations ยท incremental sync ยท MCP server + AI Skills for Claude Code | | v0.4โ0.6 | 20+ destinations (Sheets, SQL upserts, Notion, Twilio, Salesforceโฆ) ยท dagster-drt / Airflow / Prefect ยท drt test ยท parallel --threads ยท JSON Schema validation | | v0.7 โ
| Production Ready โ graceful shutdown ยท sync history ยท atomic table swaps ยท drt doctor ยท opt-in telemetry ยท sync.mode: mirror ยท DLQ + drt profile | | v0.7.9โ0.7.10 โ
| Cloud destinations (S3 / GCS / Azure / Databricks / BigQuery / Elasticsearch) ยท Delta Lake + Iceberg sources ยท tracked & scoped mirror ยท PII masking ยท VS Code extension |
Next: v0.8 Cloud Destinations & Growth โ v0.9 Enterprise Foundation โ v1.0 Stable Release โ v1.x Rust Engine
Orchestration: dagster-drt
Community-maintained Dagster integration. Expose drt syncs as Dagster assets with full observability.
pip install dagster-drt
from dagster import AssetExecutionContext, Definitions
from dagsterdrt import drtassets, DagsterDrtResource
@drtassets(projectdir="path/to/drt-project") def my_syncs(context: AssetExecutionContext, drt: DagsterDrtResource): yield from drt.run(context=context)
defs = Definitions( assets=[my_syncs], resources={"drt": DagsterDrtResource(project_dir="path/to/drt-project")}, )
See dagster-drt README for full API docs (Translator, Pipes support, DrtConfig dry-run, MaterializeResult).
CI/CD: GitHub Action
Run drt syncs straight from CI/CD with the official drt-hub/drt-action โ no infrastructure, just a few lines of YAML. Trigger on a schedule, on every push, or right after dbt finishes.
- uses: drt-hub/drt-action@v1
with:
select: '*'
extras: postgres
env:
PGPASSWORD: ${{ secrets.PGPASSWORD }}
Inputs cover sync selection (select), connector extras, profile, dry-run and threads; outputs expose status, succeeded, failed and duration-seconds (plus a step-summary table). Secrets are passed via env: and resolved by drt's *env keys. See the action README for the secrets pattern and more examples (run-after-dbt, PR preview).
Ecosystem
drt is designed to work alongside, not against, the modern data stack:
Telemetry
drt collects no telemetry by default. Opting in helps us understand which sources / destinations / sync modes are actually used, so we can prioritise.
drt config set telemetry.enabled true # opt in
drt config show-telemetry # preview the exact payload that would be sent
drt config set telemetry.enabled false # opt out
DONOTTRACK=1 drt run # universal kill switch โ overrides everything
When opted in, drt sends one synccompleted event per sync. The only properties we collect are these 9 fields: drtversion, pythonversion, os, sourcetype, destinationtype, syncmode, rowssynced, durationseconds, status. The wire envelope additionally carries event, distinctid (a per-machine random UUID at ~/.drt/.anonymousid), timestamp, and apikey. Sync names, model SQL, destination URLs, credentials, and project paths are never transmitted โ the allow-list is enforced at the function-signature level in drt/telemetry.py. By default events go to PostHog Cloud (EU region); override with DRTTELEMETRYENDPOINT and DRTTELEMETRYAPI_KEY for self-hosted PostHog or a custom collector.
Note: drt itself never transmits your IP, but the receiving PostHog backend records the TCP source IP as $ip. See docs/telemetry.md for details and how to disable / substitute the backend.
For full details see docs/telemetry.md.
Contributing
We welcome contributions of all sizes โ from typo fixes to new connectors. drt has a transparent contributor ladder so your work builds toward greater trust and responsibility over time.
- Get started: CONTRIBUTING.md โ setup, workflow, and your first connector tutorial
- Pick something to work on: Good First Issues
- Understand how decisions are made: GOVERNANCE.md
- What's free vs. enterprise: OPEN_CORE.md
- Versioning & breaking changes: VERSIONING.md
Contributors โจ
Every contribution โ code, docs, bug reports, ideas โ makes drt better. Thank you ๐
Full credits by contribution type (emoji key)
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.