Przejdź do treści
Biblioteka skilli
Dane i analityka · Integracja z narzędziem

drt-init

/drt-init

Prowadzi przez inicjalizację nowego projektu drt i konfigurację połączenia z hurtownią danych dla osób zaczynających pracę z tym narzędziem.

Repozytorium
drt ↗
Licencja
Apache-2.0
Ostatnia zmiana repozytorium
27.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 27.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

Co robi i kiedy

Prowadzi przez inicjalizację nowego projektu drt i konfigurację połączenia z hurtownią danych dla osób zaczynających pracę z tym narzędziem.

Oryginalny opis (EN)

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.

Jak działa

  1. Steps
  2. Tips
Sekcje z nagłówków SKILL.md, w oryginale · 123 linii, 1 082 słów
Podgląd SKILL.md
---
name: drt-init
description: >
  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.
---

Guide the user through initializing a new drt project.

## Steps

1. Confirm drt is installed. Pick the install line for the user's source:
   ```bash
   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.)

2. Pick the right starter shape. Four flows produce the same sync YAML shape:

   **A) Template scaffolds (fastest, ~3 commands)** — best when the user just wants something running:
   ```bash
   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:
   ```bash
   drt init --template list                  # see all available templates
   drt init --template postgres_to_slack     # operational alerts
   drt init --template duckdb_to_hubspot     # CRM-style upsert
   ```
   Each 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:
   ```bash
   mkdir my-drt-project && cd my-drt-project
   drt init
   ```
   Prompts for project name and one of the interactive wizard's source types (**bigquery / duckdb / sqlite / postgres / redshift / clickhouse**), then asks for source-specific connection fields and auth method. The other built-in source types (**snowflake / mysql / databricks / sqlserver / deltalake / iceberg / rest_api**) remain available through templates or a hand-authored `profiles.yml` entry; `drt profile add` also covers MySQL and Snowflake.

   **C) dbt manifest scaffold** — best when a dbt project already has built models:
   ```bash
   drt init --from-dbt target/manifest.json
   ```
   This interactively lists dbt models and writes selected
   `syncs/sync_<model>.yml` files without overwriting existing files.

   **D) Apache Ossie semantic-model scaffold** — best when the source metadata
   is already portable Ossie YAML/JSON:
   ```bash
   drt init --from-ossie semantic_model.yaml --destination postgres
   drt init --from-ossie semantic_model.yaml --dataset customer --dataset account --dialect SNOWFLAKE
   ```
   By default this writes one upsert sync per dataset with a `primary_key` and
   prints why unkeyed datasets are skipped. Supported destination stubs are
   `postgres` and `hubspot`; generated TODOs still need credentials, target
   table/object, and property mappings. A requested field dialect falls
   back to `ANSI_SQL`; metrics are listed but not generated because entity grain
   is unclear.

   The template and wizard flows write a full project shell; metadata scaffolds
   write sync YAML into `syncs/` (or Ossie's `--output-dir`):
   ```
   my-drt-project/
   ├── drt_project.yml
   └── syncs/<name>.yml      # first sync, runnable
   ```
   plus credentials to `~/.drt/profiles.yml`.

3. Set up auth for the chosen source (only the relevant bullet):
   - **BigQuery**: `gcloud auth application-default login` or `export 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=...`)

   For deployed environments, an `*_env` field may contain an `aws-sm://`,
   `gcp-sm://`, or `vault://` provider URI instead of an env-var name; install
   the matching optional extra. For Postgres, Snowflake, Databricks, and
   BigQuery, keep `managed_schema: _drt` (default) or choose an isolated
   schema/dataset if snapshot-diff incremental or warehouse-backed state will
   be used. This is drt bookkeeping space, not the query's default schema.

   Both `drt init` flows already write a profile to `~/.drt/profiles.yml`. To add
   another later (a second warehouse, a prod/dev split) without re-running init:
   ```bash
   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
   ```

4. Validate the setup — **credential first**, since that is the step most likely to fail:
   ```bash
   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 discovered
   drt plugins list          # installed entry-point extensions + isolated load failures
   ```
   `drt doctor` and `drt validate` inspect configuration; only `drt profile test`
   proves the warehouse accepts the credential. Run it before the first sync so a
   bad password surfaces here rather than mid-run.

5. Offer to create a first sync using the `/drt-create-sync` skill.

## Tips

- `drt_project.yml` selects which profile from `~/.drt/profiles.yml` to use; override per-run with `--profile <name>` or `DRT_PROFILE`.
- Put each sync in a separate `syncs/<name>.yml` file (sync discovery is glob-based).
- `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.
- `drt run --dry-run` runs through the engine without writing data; `--dry-run --diff` previews 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 for `mode: mirror` / `replace`).
- A project that needs shared, SQL-queryable state can set `state: {backend: warehouse, connection_profile: <profile>}`. Postgres, Snowflake, Databricks, and BigQuery store `_drt_runs`, `_drt_history`, and `_drt_dlq` under that profile's `managed_schema`; this is separate from `sync.watermark.storage`.
- `drt build` (#777) runs each sync and then its `tests:` in one pass — the `dbt build` shape; `drt build --select tag:crm --fail-fast` stops at the first failure.
- `drt test --unit` runs top-level `unit_tests:` fixture rows through computed fields, mappings, masking, and metadata without source/destination credentials.
- `drt status` shows recent run results; `drt status --output json` is the CI-friendly form.
- Every `drt run` that resolves syncs also writes `target/drt/run_results.json`; `--target-path` relocates it for CI artifact upload.
- PR CI can generate a schema-v3 manifest and run only changed definitions with `--select state:modified --state <manifest.json>` (also valid on build/test/validate).
- `drt docs generate` (v0.7.11+) renders a static HTML catalog of your project — every sync, its model, destination, and a lineage DAG — to `target/docs/`. Labels are docs-safe by default (endpoints/emails/phones stripped, #696); add `--format mermaid` or `--format json` for other outputs.
- For non-US BigQuery datasets, set `location` in `profiles.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_rest` template pre-scaffolded.

Wersje

W bazie nie ma innych skilli o nazwie drt-init.

Migawka bazy z 13.11.2026 · wersja paczki 6e408b6abd02 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100drt-create-sync
    Generuje plik YAML konfiguracji synchronizacji drt, łączącej tabelę hurtowni danych z zewnętrzną usługą w potoku Reverse ETL.
  • 100drt-debug
    Diagnozuje i naprawia nieudaną synchronizację drt: błędy uwierzytelniania, limity zapytań, błędy szablonów i inne problemy konfiguracji.
  • 100get-started
    Prowadzi przez instalację gitagent i stworzenie pierwszego agenta ze szkieletem projektu, konfiguracją i walidacją dla osób zaczynających z narzędziem.
  • 100initializing-memory
    Prowadzi przez inicjalizację lub reorganizację pamięci agenta i tworzenie skutecznych plików pamięci, przy poleceniu /init.
  • 100warehouse-init
    Inicjuje odkrywanie schematu hurtowni danych i generuje plik .astro/warehouse.md z metadanymi wszystkich tabel do szybkich wyszukiwań; odświeża się po zmianie schematu.
  • 100resolve-edit
    Pomaga w cięciu, przycinaniu, tempie i przebudowie osi czasu w DaVinci Resolve, także offline z plikami DRT.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.