Toolverse
All skills

dbt-transformation-patterns

by wshobson

Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices.

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Author
wshobson
Category
Testing
Views
83

About this skill

Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices.

How to use

  1. Zainstaluj skill w swoim projekcie agenta, dodając referencję do repozytorium wshobson/agents w sekcji plugins. 2. Utwórz strukturę katalogów projektu dbt zgodnie z architekturą medalionową: katalogi sources/, staging/, intermediate/ i marts/ w folderze models/. 3. Zdefiniuj źródła danych w plikach YAML (np. stripe__sources.yml), wskazując połączenia do surowych danych i ich schemat. 4. Utwórz modele w warstwie staging z prefixem stg, wykonując czyszczenie 1:1 z danymi źródłowymi, następnie modele intermediate z prefixem int_ zawierające logikę biznesową i złączenia, wreszcie modele marts z prefixami dim_ i fct_ jako finalne tabele analityczne. 5. Skonfiguruj plik dbt_project.yml, ustawiając ścieżki do modeli, testów i makr, oraz definiując materializację dla każdej warstwy (views dla staging, ephemeral dla intermediate, tables dla marts). 6. Dodaj testy danych w folderze tests/, sprawdzające unikalność kluczy, wartości null i spójność referencyjna, a następnie uruchom dbt test, aby weryfikować jakość transformacji przed deploymentem.

Related skills