рдореБрдЦреНрдп рдордЬрдХреБрд░рд╛рдХрдбреЗ рдЬрд╛
JobCannon
рд╕рд░реНрд╡ рдХреМрд╢рд▓реНрдпреЗ

dbt (Data Build Tool)

тмв рд╢реНрд░реЗрдгреА 2рддрд╛рдВрддреНрд░рд┐рдХ
рдЙрдЪреНрдЪ
рдкрдЧрд╛рд░рд╛рд╡рд░реАрд▓ рдкрд░рд┐рдгрд╛рдо
4 рдорд╣рд┐рдиреЗ
рд╢рд┐рдХрдгреНрдпрд╛рд╕ рд▓рд╛рдЧрдгрд╛рд░рд╛ рд╡реЗрд│
рдордзреНрдпрдо
рдХрд╛рдард┐рдгреНрдп
5
рдХрд░рд┐рдЕрд░реНрд╕
рдПрдХрд╛ рджреГрд╖реНрдЯрд┐рдХреНрд╖реЗрдкрд╛рдд

dbt (data build tool) = SQL-based transformation framework for the modern data stack, enabling version control, testing, and documentation of data transformations via Git workflows. Career path: Data Analyst with dbt fundamentals (SQL models, tests, docs, $85-110k) тЖТ Analytics Engineer (macros, incremental models, CI/CD, $110-145k) тЖТ Senior/Data Architect (custom materializations, orchestration, semantic layer, $145-180k). High demand: 10k+ companies (Stripe, GitLab, Shopify). Modern ELT stack (Fivetran тЖТ dbt тЖТ Snowflake тЖТ Looker) drove 80%+ adoption in data teams.

dbt (Data Build Tool) рдореНрд╣рдгрдЬреЗ рдХрд╛рдп

SQL-based transformation framework for the modern data stack. Version control, test, and document data transformations. Standard for analytics engineering and ELT workflows. Learning Curve: Medium (SQL + software engineering practices)

ЁЯФз рд╕рд╛рдзрдиреЗ рдЖрдгрд┐ рдкрд░рд┐рд╕рдВрд╕реНрдерд╛
dbt Coredbt CloudSnowflakeBigQueryAmazon RedshiftDatabricksFivetranApache AirflowStitchLookerGitVS Code

ЁЯУЛ рд╕реБрд░реВ рдХрд░рдгреНрдпрд╛рдкреВрд░реНрд╡реА

ЁЯТ░ рдкреНрд░рджреЗрд╢рд╛рдиреБрд╕рд╛рд░ рдкрдЧрд╛рд░

рдкреНрд░рджреЗрд╢рдЬреНрдпреБрдирд┐рдпрд░рдордзреНрдпрдорд╕реАрдирд┐рдпрд░
USA$85k$128k$163k
UK┬г52k┬г82k┬г110k
EUтВм58kтВм90kтВм125k
CANADAC$92kC$135kC$175k

ЁЯОп dbt (Data Build Tool) рд╡рд╛рдкрд░рдгрд╛рд░реА рдХрд░рд┐рдЕрд░

тЪЦ рдпрд╛рдВрдЪреНрдпрд╛рд╢реА рддреБрд▓рдирд╛ рдХрд░рд╛

тЭУ FAQ

dbt vs traditional ETL (like Informatica), what's the difference?
dbt is an ELT framework (Extract Load Transform), data lands in your warehouse first, then dbt transforms it using SQL. Traditional ETL transforms before loading. dbt's advantage: leverage the warehouse's compute (Snowflake, BigQuery), version-control transformations via Git, test data quality, document lineage, and iterate quickly. Drawback: requires centralized data warehouse (not cheap for small datasets). Use dbt if you have Snowflake/BigQuery/Redshift + >1GB data. Use traditional ETL if moving raw files between on-prem systems.
What's a 'model' in dbt and how does it differ from a view or table?
A dbt model = a SQL file that defines a transformation. When you run dbt, each model becomes either a view or table in your warehouse (you choose via materialization config). View = query runs every time (cheaper compute, slower), table = pre-computed and stored (expensive compute, fast queries). Incremental model = hybrid (update only new rows since last run). Use tables for frequently-queried fact tables, views for intermediate staging layers. `SELECT * FROM {{ ref('my_model') }}` pulls from upstream models.
How do I test data quality in dbt and prevent bad data from reaching downstream dashboards?
dbt includes built-in tests (unique, not_null, relationships, accepted_values) in schema.yml and custom SQL tests. Example: `- name: user_id\n tests:\n - unique\n - not_null`. Run `dbt test` to validate. Fail fast: block downstream models if tests fail (dbt's default). Advanced: write custom tests (e.g., 'conversion rate between 0 and 1'). Test at source level (raw data) and model level (transformed). Monitor test coverage: aim for >80% of columns tested.
Snapshots and incremental models, when do I use each?
Incremental = transforms only NEW rows since last run (fast, cheap). Use for fact tables growing daily (events, transactions). Snapshot = captures a point-in-time view of a slowly-changing dimension (SCD). Example: snapshot user profile each day, track when 'plan' column changed from free to paid. Incremental fails if you need historical versions of a row; snapshot is designed for that. Rule of thumb: incremental for immutable events, snapshots for mutable dimensions.
How do I set up CI/CD for dbt in production (dbt Cloud vs self-hosted)?
dbt Cloud = managed solution, runs jobs on dbt's infrastructure, built-in scheduler, PR deployment previews (run jobs against staging branch). Cost ~$100-300/mo. Self-hosted (Airflow/Dagster) = you manage Python orchestrator, invoke dbt CLI in tasks, more control but more ops. Modern best practice: use dbt Cloud for small teams (<$10M ARR), self-hosted for large companies managing complex DAGs. dbt Cloud integration: commit to branch, dbt automatically runs `dbt test` + `dbt build` on preview branch before merging to main.
What's the dbt semantic layer and how does it change analytics?
Semantic layer = centralized metric definitions (one source of truth for KPIs). Instead of each BI tool defining 'revenue' differently, dbt semantic layer defines it once (SELECT SUM(amount) WHERE status='paid'), and Looker/Tableau/Metabase pull from it. Benefit: consistency, fast iterations (change metric definition once, all dashboards update). Drawback: new workflow, requires dbt Cloud (not Core), learning curve. Use if: multiple BI tools or teams defining metrics differently. Skip if: small team, single BI tool.
How do I debug dbt when transformations produce wrong results?
Use `dbt debug` to check Warehouse connection. Use `dbt run --select my_model` to run one model. Check `target/compiled/` folder to see the actual SQL generated (Jinja templates expanded). Check `target/run_results.json` for execution times and test failures. Common bugs: missing WHERE clause (forgot to filter source data), wrong join logic (many-to-many join creating duplicates), stale dependencies (old ref() to wrong model). Always run `dbt test` after model changes. Use `dbt freshness` to check source data staleness.

рд╣реЗ рдХреМрд╢рд▓реНрдп рддреБрдордЪреНрдпрд╛рд╕рд╛рдареА рдпреЛрдЧреНрдп рдЖрд╣реЗ рдХрд╛, рдпрд╛рдЪреА рдЦрд╛рддреНрд░реА рдирд╛рд╣реА?

рдХрд░рд┐рдЕрд░ рдореЕрдЪ рдХрд░реВрди рдкрд╛рд╣рд╛ тАФ рдЖрдореНрд╣реА рдпреЛрдЧреНрдп рдорд╛рд░реНрдЧ рд╕реБрдЪрд╡реВ.

рдорд╛рдЭреНрдпрд╛рд╕рд╛рдареА рд╕рд░реНрд╡реЛрддреНрддрдо рдХреМрд╢рд▓реНрдпреЗ рд╢реЛрдзрд╛ тЖТ

рддреБрдордЪрд╛ рдЖрджрд░реНрд╢ рдХрд░рд┐рдЕрд░ рдорд╛рд░реНрдЧ рд╢реЛрдзрд╛

реи,релреирез рдХрд░рд┐рдЕрд░рдордзреНрдпреЗ рдХреМрд╢рд▓реНрдпрд╛рдВрд╡рд░ рдЖрдзрд╛рд░рд┐рдд рдЬреБрд│рдгреА. рдореЛрдлрдд, ~3 рдорд┐рдирд┐рдЯреЗ.

рдХрд░рд┐рдЕрд░ рдореЕрдЪ рдХрд░реВрди рдкрд╛рд╣рд╛ тАФ рдореЛрдлрдд тЖТ