Drt init
Guide a user through initializing a new drt project. Use this skill when a user is setting up drt for the first time, asks how to get started with drt, or needs help configuring their data warehouse connection.From its SKILL.md
npx -y skills add drt-hub/drt --skill drt-initAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
5.5 KB, as published. Nobody here has run it
Guide the user through initializing a new drt project.
Steps
-
Confirm drt is installed. Pick the install line for the user's source:
pip install drt-core # core (DuckDB / SQLite / REST API source — no extras) pip install drt-core[bigquery] # BigQuery source pip install drt-core[postgres] # Postgres / Redshift source pip install drt-core[mysql] # MySQL source pip install drt-core[clickhouse] # ClickHouse source pip install drt-core[snowflake] # Snowflake source pip install drt-core[databricks] # Databricks source pip install drt-core[sqlserver] # SQL Server source pip install drt-core[deltalake] # Delta Lake source pip install drt-core[iceberg] # Iceberg source(Or
uv add drt-core[...]if the user prefers uv.) -
Pick the right starter shape. Two flows produce the same project skeleton:
A) Template scaffolds (fastest, ~3 commands) — best when the user just wants something running:
mkdir my-drt-project && cd my-drt-project drt init --template duckdb_to_rest # DuckDB → REST API (no accounts needed, uses httpbin.org)Other templates:
drt init --template list # see all available templates drt init --template postgres_to_slack # operational alerts drt init --template duckdb_to_hubspot # CRM-style upsertEach template prints next-steps for the env vars / source data it needs.
B) Interactive wizard (guided) — best when the user wants to be walked through a real warehouse setup:
mkdir my-drt-project && cd my-drt-project drt initPrompts for project name, source type (any of: bigquery / duckdb / sqlite / postgres / redshift / clickhouse / snowflake / mysql / databricks / sqlserver / deltalake / iceberg / rest_api), source-specific connection fields, and auth method.
Either flow writes:
my-drt-project/ ├── drt_project.yml └── syncs/<name>.yml # first sync, runnableplus credentials to
~/.drt/profiles.yml. -
Set up auth for the chosen source (only the relevant bullet):
- BigQuery:
gcloud auth application-default loginorexport GOOGLE_APPLICATION_CREDENTIALS=/path/to/sa.json - Postgres / Redshift / MySQL / ClickHouse / Snowflake / SQL Server: set the password env var the profile references (e.g.
export DRT_PG_PASSWORD=...) - Databricks: set
DATABRICKS_TOKEN(personal access token from Workspace → User Settings) - DuckDB / SQLite: nothing — file path only
- REST API source: set the bearer token env var the profile references (e.g.
export REST_API_TOKEN=...)
Both
drt initflows already write a profile to~/.drt/profiles.yml. To add another later (a second warehouse, a prod/dev split) without re-running init:drt profile add <name> # interactive — prompts for source type + connection fields drt profile list # names + source types already configured drt profile show <name> # inspect one, inline secrets masked - BigQuery:
-
Validate the setup — credential first, since that is the step most likely to fail:
drt profile test <name> # actually connects, using the source's own connection check drt doctor # env-level triage — catches missing env vars, malformed profile, etc. drt validate # YAML schema check drt list # confirm syncs are discovereddrt doctoranddrt validateinspect configuration; onlydrt profile testproves the warehouse accepts the credential. Run it before the first sync so a bad password surfaces here rather than mid-run. -
Offer to create a first sync using the
/drt-create-syncskill.
Tips
drt_project.ymlselects which profile from~/.drt/profiles.ymlto use; override per-run with--profile <name>orDRT_PROFILE.- Put each sync in a separate
syncs/<name>.ymlfile (sync discovery is glob-based). drt sources --detailedanddrt destinations --detailedprint every connector's required env vars and a sample YAML stanza — useful when hand-authoring beyond the templates.drt run --dry-runruns through the engine without writing data;--dry-run --diffpreviews record-level changes for queryable destinations.drt run --limit 10(#774) really loads at most 10 rows for a safe first send (watermark won't advance; refused formode: mirror/replace).drt build(#777) runs each sync and then itstests:in one pass — thedbt buildshape;drt build --select tag:crm --fail-faststops at the first failure.drt statusshows recent run results;drt status --output jsonis the CI-friendly form.drt docs generate(v0.7.11+) renders a static HTML catalog of your project — every sync, its model, destination, and a lineage DAG — totarget/docs/. Labels are docs-safe by default (endpoints/emails/phones stripped, #696); add--format mermaidor--format jsonfor other outputs.- For non-US BigQuery datasets, set
locationinprofiles.yml(e.g."EU","asia-northeast1"). - Want to try drt without installing locally? Open the repo in GitHub Codespaces — the devcontainer ships drt + a seeded DuckDB warehouse + the
duckdb_to_resttemplate pre-scaffolded.