Skip to content

Top 30 dbt Interview Questions and Answers [2026]

November 19, 2026 26 min read
dbt interview guide by Second Talent
TL;DR: dbt interviews in 2026 test model layering, incremental strategies that survive late data, the difference between data tests and unit tests, snapshots, and slim CI with state:modified and --defer. Candidates should also know that dbt v2.0.0 (September 14, 2026) is the new Rust-based engine built on the Fusion code, now at 2.0.11 (November 3, 2026), and that the Python 1.x line is still supported, with 1.12.6 released October 14, 2026.

dbt Labs released dbt 2.0.0 on September 14, 2026, and with it the Fusion engine name went away: the full binary is now called dbt, and its Apache 2.0 subset is dbt OSS.

The v2.0.0 release notes document the rename, and the upgrade guide says v2 will not support any deprecated functionality, so projects that ignored 1.10 warnings now fail to parse.

These questions cover modeling, incremental logic, testing, snapshots, CI and the Semantic Layer, for US hiring managers interviewing analytics engineers and data engineers who own a dbt project.

Key takeaways
  1. 1In dbt Labs' benchmark, a 10,000-node project compiled in 17 seconds on dbt v2 against 70 seconds on dbt 1.12.0.
  2. 2Microbatch models reprocess 1 prior batch by default (lookback: 1). Data that lands two days late is missed unless you raise it.
  3. 3With --defer, a ref points at production only when the parent is not selected and not built in your schema, unless you add --favor-state.
  4. 4In dbt v2, --models and -m now error, unknown YAML keys fail parsing, and behavior flags marked for removal in 2.0 can no longer be turned off.

Project Structure and Models

1. How do you layer a dbt project, and what belongs in each layer?

The common structure is staging, intermediate and marts, and each layer has a narrow job:

  • Staging: one model per source table, named like stg_stripe__payments. Rename columns, cast types, convert cents to dollars, deduplicate. No joins across sources, no business logic.
  • Intermediate: reusable building blocks that join or reshape staging models, such as int_payments_pivoted_to_orders. Usually not exposed to BI users.
  • Marts: facts and dimensions at a declared grain, owned by a business domain, which BI tools and the Semantic Layer read.

The test of a strong answer is the reason behind the layers: a source schema change is fixed in one staging model rather than in twenty downstream ones, and every mart reads cleaned, typed columns.

A weak candidate describes folders without saying what logic is forbidden where. For fact table grain itself, our data engineer interview guide covers dimensional modeling in more depth.

2. Why use ref() and source() instead of table names?

ref() and source() do three things a hard-coded name cannot. They build the DAG, so dbt runs parents before children and selectors like my_model+ work.

They resolve to the right database and schema per target, so the same code builds into dbt_alice in development and analytics in production.

And with --defer, a ref to an unbuilt parent can resolve to the production relation instead (question 20).

A hard-coded analytics.orders reads production from a dev run, so a developer can test a change against data their own branch never built, and the lineage graph silently loses the edge. source() also powers freshness checks and the source: selector.

A strong candidate mentions that dbt v2's static analysis can now flag column references that do not exist upstream, which only works when dependencies go through ref and source.

3. Which materialization do you choose, and when?

  • view: default. No storage, always fresh, but every query reruns the logic. Good for staging models and light transforms.
  • table: rebuilt on each run. Fast to query, simple to reason about, costly when the model is large and only a small slice changes.
  • incremental: inserts or merges only new and changed rows after the first build. Use it when a full rebuild takes too long or costs too much.
  • ephemeral: compiled into downstream models as a CTE. Nothing is created in the warehouse, which also means you cannot query it to debug, and unit tests need format: sql fixtures for ephemeral inputs.
  • materialized_view: lets the warehouse keep the result fresh. Adapter support and refresh behavior vary, and unit tests do not support it.

A senior candidate starts with views, promotes to tables when query cost or latency demands it, and moves to incremental only with a clear story for late data and full refreshes. Making every model incremental by default is a red flag.

4. How does dbt decide which schema a model builds into?

The generate_schema_name macro decides. The built-in version concatenates the target schema and any custom schema, so a model configured with schema: finance builds into dbt_alice_finance in development and analytics_finance in production.

Many teams override the macro so production uses the custom schema name alone.

{% macro generate_schema_name(custom_schema_name, node) -%}
    {%- if target.name == 'prod' and custom_schema_name is not none -%}
        {{ custom_schema_name | trim }}
    {%- else -%}
        {{ target.schema }}{% if custom_schema_name is not none %}_{{ custom_schema_name | trim }}{% endif %}
    {%- endif -%}
{%- endmacro %}

The trap: an override that returns nothing on some branch. dbt 1.12 deprecated null returns from generate_schema_name, and the require_valid_schema_from_generate_schema_name flag turns that warning into a parse error.

A strong candidate knows that CI pull request schemas also flow through this macro, so a bad override can make two pull requests write into the same schema.

5. What goes wrong with this macro, and why?

{% set methods = run_query(
    "select distinct payment_method from " ~ ref('stg_payments')
) %}

select
    order_id,
    {% for m in methods.columns[0].values() %}
    sum(case when payment_method = '{{ m }}' then amount end) as {{ m }}_amount,
    {% endfor %}
    sum(amount) as total_amount
from {{ ref('stg_payments') }}
group by 1

Answer: on dbt 1.x the project fails to parse with an error like 'None' has no attribute 'columns'. dbt renders Jinja twice: once at parse time to build the DAG, when execute is False and run_query returns None, and again at execution.

The loop runs during parsing against None.

Fix: wrap the query and loop in {% if execute %}, or use dbt_utils.get_column_values, which handles the guard.

The deeper follow-up: a model whose columns depend on live data changes shape whenever a new payment method appears, which breaks contracts and downstream dashboards.

A senior candidate would hard-code the known methods and add an accepted_values test so a new value fails loudly.

Incremental Models

6. When does is_incremental() return true?

When all four conditions hold: the model's relation already exists in the warehouse, it exists as a table, the model is configured with materialized='incremental', and the run was not started with --full-refresh (or the model sets full_refresh: false, which blocks full refreshes).

{{ config(
    materialized='incremental',
    unique_key='order_id',
    incremental_strategy='merge',
    on_schema_change='append_new_columns'
) }}

select order_id, customer_id, status, amount, updated_at
from {{ ref('stg_orders') }}

{% if is_incremental() %}
where updated_at >= (select max(updated_at) from {{ this }}) - interval '3 days'
{% endif %}

On the first run the filter is skipped and the full history loads.

A strong candidate explains on_schema_change: the default ignore drops new source columns on incremental runs without an error, append_new_columns adds them, sync_all_columns also removes dropped ones, and fail stops the run.

Most teams find out about ignore when a column they expected is missing for three months.

7. Compare the incremental strategies.

  • append: inserts new rows only. Cheapest, but any reprocessed row becomes a duplicate.
  • merge: matches on unique_key, updates existing rows and inserts new ones. Correct for mutable records, but the warehouse may scan the whole target to find matches unless you add incremental_predicates to limit the scan.
  • delete+insert: deletes target rows whose keys appear in the new batch, then inserts. Useful where MERGE is slow or missing.
  • insert_overwrite: replaces whole partitions (BigQuery, Spark, Databricks). Good for date-partitioned facts where you rebuild recent days in full.
  • microbatch: splits work into time batches by event_time and runs each as its own query (question 9).

Support differs per adapter, so a candidate should name the warehouse they used. The judgment call: merge on a 5-billion-row table with no predicate can cost more than the full rebuild it was meant to avoid.

8. Find the bugs in this incremental model.

{{ config(materialized='incremental') }}

select
    event_id,
    user_id,
    event_type,
    event_at,
    loaded_at
from {{ source('app', 'events') }}

{% if is_incremental() %}
where event_at > (select max(event_at) from {{ this }})
{% endif %}

Bugs:

  • Late events are lost. The filter uses event time. A mobile event from yesterday that lands after today's events have loaded is older than max(event_at) and never gets in. Filter on loaded_at, or keep a lookback window.
  • No unique_key. With the default append behavior, any overlap or retry inserts duplicates, and a lookback window would make that worse. Add unique_key='event_id' with a merge or delete+insert strategy.
  • Strict greater-than. Rows sharing the max timestamp but arriving in a later load are skipped.
  • Reads the source directly. No staging model deduplicates or types the data first.

A strong candidate also asks how the model recovers from a bad week: either a targeted backfill with a variable for the date range or --full-refresh, and they know which one the warehouse budget allows.

9. How does the microbatch strategy work?

Microbatch, available from dbt 1.9, processes an incremental model in time slices. Per the microbatch docs, it requires event_time, begin and batch_size (hour, day, month or year), with optional lookback (default 1) and concurrent_batches.

{{ config(
    materialized='incremental',
    incremental_strategy='microbatch',
    event_time='event_occurred_at',
    batch_size='day',
    lookback=3,
    begin='2024-01-01'
) }}

select * from {{ ref('stg_events') }}

There is no is_incremental() block. dbt adds the time filter itself, but only to upstream refs and sources that also define event_time; without it, each batch scans the full upstream table.

Backfills use dbt run --event-time-start "2026-09-01" --event-time-end "2026-09-04", and dbt retry reruns only failed batches.

A senior candidate notes the cost model: 365 daily batches means 365 queries, which is cheaper than one giant query on some warehouses and slower on others.

10. When do you run --full-refresh, and when do you block it?

--full-refresh drops and rebuilds an incremental model from scratch.

You need it after changing the model's logic for historical rows, after fixing a bug that corrupted past data, or when the schema change is not something on_schema_change handles.

Block it with full_refresh: false on models where a rebuild is impossible or ruinous: a table whose source retains only 30 days of history, or a 50 TB fact table whose rebuild costs more than the team's monthly budget.

With the flag set, dbt run --full-refresh leaves that model incremental.

The better practice for large models is a backfill pattern: rebuild a bounded date range through variables or microbatch's --event-time-start, which a strong candidate will propose before reaching for a full rebuild.

Testing and Contracts

11. What data tests do you put on a mart, and how do you control their severity?

The four built-in generic tests are unique, not_null, accepted_values and relationships. Since dbt 1.8 they are declared under data_tests: to distinguish them from unit tests.

On a mart, test the primary key for uniqueness and nulls at the declared grain, foreign keys with relationships, and status columns with accepted_values.

models:
  - name: fct_orders
    columns:
      - name: order_id
        data_tests:
          - unique
          - not_null
      - name: customer_id
        data_tests:
          - not_null:
              config:
                severity: error
                warn_if: ">0"
                error_if: ">100"
                where: "ordered_at >= current_date - 7"

The where config limits a test to recent rows, which keeps tests cheap on large tables. store_failures writes failing rows to a table so someone can inspect them.

A strong candidate distinguishes tests that should block a deploy from tests that should only alert, and does not leave hundreds of warnings that nobody reads.

12. What is a unit test in dbt, and how is it different from a data test?

A data test runs against real warehouse data after a model builds and asks "is this data valid?"

A unit test, available since dbt 1.8, feeds static input rows to a model's SQL and compares the output to expected rows, asking "is this logic correct?" before the model is built.

unit_tests:
  - name: test_is_valid_email_address
    model: dim_customers
    given:
      - input: ref('stg_customers')
        rows:
          - {email: cool@example.com, email_top_level_domain: example.com}
          - {email: badgmail.com, email_top_level_domain: gmail.com}
      - input: ref('top_level_email_domains')
        rows:
          - {tld: example.com}
          - {tld: gmail.com}
    expect:
      rows:
        - {email: cool@example.com, is_valid_email_address: true}
        - {email: badgmail.com, is_valid_email_address: false}

Per the unit test docs, you only list the columns the test needs, every ref and source must appear as an input, and unit tests must live in YAML under models/. dbt Labs recommends running them in development and CI only.

Limitations worth knowing: SQL models only, no materialized views, no recursive SQL and no introspective queries. Use them for regex, date math, window functions and case statements with edge cases.

13. How do you unit test the incremental branch of a model?

Override is_incremental and supply the current table contents as the this input. The expected rows are what the run would insert or merge, not the final table.

unit_tests:
  - name: orders_incremental_mode
    model: fct_orders
    overrides:
      macros:
        is_incremental: true
    given:
      - input: ref('stg_orders')
        rows:
          - {order_id: 1, updated_at: 2026-11-01}
          - {order_id: 2, updated_at: 2026-11-05}
      - input: this
        rows:
          - {order_id: 1, updated_at: 2026-11-01}
    expect:
      rows:
        - {order_id: 2, updated_at: 2026-11-05}

A good candidate writes a second test with is_incremental: false to cover the first build.

The value here is catching the filter bugs from question 8 before they ship: off-by-one comparisons, wrong timestamp column, or a lookback window that does not apply.

14. What do model contracts and versions give you?

A contract (contract: {enforced: true}) makes dbt check before building that the model returns exactly the declared columns and data types, and it applies supported constraints such as not_null and primary_key in the DDL.

A downstream team can rely on the shape of the table.

models:
  - name: dim_customers
    config:
      contract:
        enforced: true
    columns:
      - name: customer_id
        data_type: int
        constraints:
          - type: not_null
          - type: primary_key
      - name: email
        data_type: varchar

Versions handle breaking changes: you publish dim_customers v2 next to v1, consumers migrate on their schedule with ref('dim_customers', v=2), and v1 gets a deprecation date. dbt 1.12 added the opt-in latest_version_pointer_enabled_by_default flag, which creates a pointer view for the latest version.

A strong candidate notes that most warehouses do not enforce primary_key constraints, so the unique test is still needed.

15. A test fails in production at 6 a.m. What happens next?

The answer reveals how the candidate runs a project. The steps a strong candidate describes:

  1. Decide blast radius. With dbt build, a failing test skips downstream models, so dashboards show yesterday's data instead of wrong data. That is usually the right failure mode.
  2. Look at the failing rows through store_failures or the compiled test SQL in target/.
  3. Classify the cause: an upstream source changed, a late or duplicated load, or a model bug.
  4. Fix and rerun with dbt retry, which reruns from the point of failure using the previous run's results.
  5. Prevent repeats: add a source freshness check, a unit test, or a test on the staging model closer to the cause.

A weak answer lowers the test's severity to warn to make the job green.

Snapshots and Sources

16. How do snapshots work, and how do you pick a strategy?

A snapshot records changes to a mutable source over time as a Type 2 slowly changing dimension.

Each run compares current rows to the snapshot table and, when a row changed, closes the old version by setting dbt_valid_to and inserts a new one. Since dbt 1.9, snapshots are configured in YAML:

snapshots:
  - name: orders_snapshot
    relation: source('jaffle_shop', 'orders')
    config:
      schema: snapshots
      unique_key: id
      strategy: timestamp
      updated_at: updated_at
      dbt_valid_to_current: "to_date('9999-12-31')"

The timestamp strategy uses a reliable updated_at column and is the one the snapshot docs recommend.

The check strategy compares listed check_cols and suits tables without a trustworthy timestamp. dbt_valid_to_current sets a far-future date for current rows instead of NULL, which makes range joins simpler.

A strong candidate knows snapshots only capture state at run time: if a row changes three times between daily runs, two versions are never recorded.

17. How do snapshots handle rows deleted from the source?

Through the hard_deletes config, which replaced invalidate_hard_deletes from 1.8 and earlier:

  • ignore (default): nothing happens, so a deleted customer stays current forever.
  • invalidate: sets dbt_valid_to on the deleted row, closing it.
  • new_record: inserts a new row with the dbt_is_deleted meta column set, so the deletion is itself an event in history, and a later reinsert is tracked too.

Detecting deletes requires dbt to compare the full source against the snapshot, so it only works when the snapshot reads the complete current table, not an incremental extract.

A senior candidate asks whether the source does soft deletes already, in which case a deleted_at column in check_cols may be more reliable.

18. Find the bug: this snapshot table grows by 2 million rows every night.

snapshots:
  - name: customers_snapshot
    relation: source('crm', 'customers')
    config:
      unique_key: customer_id
      strategy: check
      check_cols: all

The source has 2 million customers, and only a few hundred change per day.

Bug: the source table includes an ELT metadata column such as _fivetran_synced or _loaded_at that changes on every sync. With check_cols: all, every row looks changed on every run, so every customer gets a new version nightly.

Fix: list the business columns explicitly in check_cols, or switch to the timestamp strategy on the source's own updated_at. Also snapshot a light staging select that drops metadata columns.

The snapshot docs recommend listing columns explicitly for this reason. Cleaning up the existing history needs a one-off query that collapses consecutive identical versions, which is a good follow-up to see if the candidate can write it.

19. How do you configure and use source freshness?

Freshness compares the newest timestamp in a source table to the current time and warns or errors past a threshold.

In current versions both freshness and loaded_at_field sit under config, and dbt 1.10 added loaded_at_query for custom SQL instead of a column.

sources:
  - name: stripe
    schema: raw_stripe
    config:
      loaded_at_field: _loaded_at
      freshness:
        warn_after: {count: 6, period: hour}
        error_after: {count: 24, period: hour}
    tables:
      - name: payments
      - name: refunds

dbt source freshness writes sources.json, and the source_status:fresher+ selector then builds only models downstream of sources that received new data since the last run.

That turns a fixed hourly job into one that does work only when something changed.

A strong candidate sets thresholds from the loader's actual schedule and picks a column the loader writes (_loaded_at), not a business timestamp that can be old for valid reasons.

CI, State and Packages

20. How does slim CI work in dbt?

Slim CI builds only what a pull request changed. You keep the manifest.json from the last production run, then in CI:

dbt build --select state:modified+ --defer --state ./prod-artifacts

state:modified+ selects nodes whose definition differs from the production manifest, plus everything downstream. --defer handles the parents you did not build.

Per the defer docs, dbt resolves a ref to the production relation only when the parent is not among the selected nodes and does not exist in the CI schema, or when --favor-state is passed. Ephemeral models are never deferred.

The caveat the docs call out: with defer, a CI run can read a mix of production and development data, and a relationships test can compare across environments.

A strong candidate builds each pull request into its own schema, drops it after merge, and refreshes the production artifacts after every deploy so state:modified stays accurate.

21. Why does state:modified flag models nobody touched?

Common causes: configs that render differently per target (for example a schema computed from target.name), a changed macro that many models call, env_var() values that differ between CI and production, or a package upgrade.

Subselectors narrow the check: state:modified.body, state:modified.configs, state:modified.relation, state:modified.persisted_descriptions, state:modified.macros and state:modified.contract.

dbt 1.12 enabled the state_modified_compare_more_unrendered_values behavior flag by default, which compares unrendered config values and removes many cross-target false positives.

A strong candidate diagnoses with dbt ls --select state:modified --state ... before tuning, rather than guessing, and knows that over-selection costs money while under-selection ships untested code, so they err toward over-selection.

22. When do you use dbt clone or dbt retry?

dbt clone creates copies of selected models in the target schema from the relations recorded in a state manifest, using zero-copy clones where the warehouse supports them (Snowflake, Databricks, BigQuery) and views otherwise.

It suits two jobs: giving CI a full set of upstream tables when deferral is awkward (for example, when a BI tool or a test needs every table present in one schema), and building blue/green deployments where you build into a staging schema and swap.

dbt retry reruns a failed invocation from the point of failure using run_results.json, skipping nodes that succeeded. For microbatch models it reruns only failed batches.

A good candidate uses retry instead of rerunning a two-hour job for one failed model at the end.

23. How do you manage dbt packages safely?

Declare packages in packages.yml (or dependencies.yml, which also lists cross-project dependencies but does not allow Jinja), pin version ranges, and commit package-lock.yml so every environment installs identical versions.

# packages.yml
packages:
  - package: dbt-labs/dbt_utils
    version: [">=1.3.0", "<2.0.0"]
  - git: "https://github.com/acme/dbt-internal-macros.git"
    revision: v2.4.1

Pin git packages to a tag or commit, not a branch.

For dbt v2, the v2 upgrade guide says packages whose require-dbt-version includes 2.0.0 are compatible, names dbt_utils, audit_helper, dbt_external_tables and dbt_project_evaluator as ready, and warns other packages may fail to parse.

It also raises dbt8999 when version ranges cannot be combined. A strong candidate audits packages before an upgrade rather than discovering incompatibilities in production.

24. How do you keep development and CI runs from costing as much as production?

  • Defer to production for unchanged parents instead of rebuilding them (question 20).
  • --empty builds models with zero rows to validate SQL and schemas cheaply.
  • --sample, added in 1.10 for run and build, filters refs and sources by time so models build on a recent slice.
  • Target-based limits: a macro that adds a date filter when target.name == 'dev'.
  • Zero-copy clones for the few large tables a developer needs in full.
  • Exclude unit tests from production with --exclude-resource-type (1.11 and later), since their inputs are static.

The trade-off a strong candidate names: sampled data hides bugs that only appear at full scale, such as a join that fans out on one rare key, so the final pre-merge check should still hit realistic volumes for the models that changed.

Semantic Layer

25. Explain semantic models, entities, dimensions, measures and metrics.

The dbt Semantic Layer, powered by MetricFlow, defines metrics once in YAML so every BI tool and API asks for "revenue" and gets the same SQL.

A semantic model maps to one dbt model and declares entities (join keys), dimensions (group-by columns) and measures (aggregations). Metrics are built on measures.

semantic_models:
  - name: orders
    model: ref('fct_orders')
    defaults:
      agg_time_dimension: ordered_at
    entities:
      - name: order_id
        type: primary
      - name: customer
        type: foreign
        expr: customer_id
    dimensions:
      - name: ordered_at
        type: time
        type_params:
          time_granularity: day
      - name: channel
        type: categorical
    measures:
      - name: order_total
        agg: sum

metrics:
  - name: revenue
    label: Revenue
    type: simple
    type_params:
      measure: order_total

Metric types are simple, ratio, cumulative, derived and conversion. MetricFlow uses entities to join semantic models at query time, so "revenue by customer region" works without a pre-built mart.

A strong candidate can explain why a ratio metric must aggregate numerator and denominator separately instead of averaging a per-row ratio.

26. Why put metrics in dbt instead of in the BI tool?

Because metric logic in the BI tool gets copied. Finance defines revenue net of refunds in one dashboard, growth defines it gross in another, and the two numbers meet in a board meeting.

Defining metrics in dbt puts them in version control and code review, alongside the tests on the models they read.

Two recent changes matter here. dbt Labs relicensed MetricFlow under Apache 2.0 on October 14, 2025, as part of its Open Semantic Interchange commitment, so the metric definitions are no longer tied to a proprietary engine.

And dbt 1.12 began parsing a new YAML spec that attaches semantic entities, dimensions and metrics directly to model definitions.

A candidate who works with the Semantic Layer should know whether their project uses the original semantic_models spec or the new one.

27. Why does MetricFlow need a time spine, and what happens without one?

A time spine is a model with one row per day (or hour), and MetricFlow joins to it for cumulative metrics, offsets such as "revenue 7 days ago", and filling dates that had no activity.

Without it, a cumulative metric over a period with no orders returns gaps instead of carrying the running total, and offset metrics cannot be computed.

Since dbt 1.9, the time spine is declared in YAML on a model, and dbt 1.12 made require_yaml_configuration_for_mf_time_spines a default behavior.

A strong candidate generates the spine with dbt_utils.date_spine or a warehouse function, covers the full date range the business queries (including future dates for forecasts), and adds an hourly spine only if a metric needs hourly granularity.

What Changed Recently

Jun 16, 2025
dbt 1.10: --sample, loaded_at_query, deprecation warnings for custom keys and -m
Oct 14, 2025
MetricFlow relicensed under Apache 2.0
Dec 19, 2025
dbt 1.11: user-defined functions as a resource, DBT_ENGINE_ env var prefix
Jun 1, 2026
dbt Core v2 alpha published under Apache 2.0; the Fusion repository is archived
Jul 16, 2026
dbt 1.12: 1.9 and 1.10 behavior flags on by default, --use-v2-parser beta
Sep 14, 2026
dbt 2.0.0 GA; Fusion is renamed dbt, the open subset is dbt OSS
Nov 3, 2026
dbt 2.0.11 renames --run-cache-mode to --state-mode and adds BigQuery reservation config

28. What is dbt v2, and how does it relate to Fusion, dbt OSS and dbt Core 1.x?

dbt v2 is a rewrite of the engine in Rust, built on the code dbt Labs developed as the Fusion engine.

Per the dbt Core v2 announcement (June 1, 2026), the runtime that was planned for the ELv2 license shipped under Apache 2.0, and the separate Fusion repository was archived. At GA, the naming settled into two distributions:

  • dbt: the recommended, free distribution with SQL comprehension, static analysis, the language server and column-level lineage. It contains proprietary code, and some features need a free login.
  • dbt OSS: the Apache 2.0 runtime, for organizations that require open source licensing.

Adapters ship inside the binary using ADBC drivers, so no Python runtime is needed. The upgrade guide lists BigQuery, Databricks, Redshift and Snowflake, ClickHouse in private beta, and Spark and DuckDB for CLI use.

The Python 1.x line is still supported. A strong candidate can say which distribution their team runs and why, and treats license questions as a procurement topic, not a technical one.

29. How would you migrate a 1.x project to dbt v2?

dbt Labs' recommended path, from the v2 announcement and upgrade guide:

  1. Upgrade to 1.12 first, which enforces many of the behavior changes v2 removes.
  2. Clear every deprecation warning, including the 1.10 ones for custom YAML keys and -m. The dbt-autofix tool rewrites many automatically.
  3. Test parsing with dbt parse --use-v2-parser. If it succeeds, the project parses on v2.
  4. Fix v2-specific errors: standalone YAML anchors move under a top-level anchors: key, self-referential anchors fail, unknown CLI options and duplicate config keys error, and missing macros or undefined var() calls now fail at parse time instead of compile time.
  5. Check packages for a require-dbt-version range that includes 2.0.0.
  6. Read meta through config.meta_get(), since config.get() no longer reads meta.

Manifests stay at v12 and compatible with v1, so state:modified and --defer work across mixed v1 and v2 environments during a phased rollout.

A senior candidate would migrate CI first, compare compiled SQL and row counts between engines, then switch production.

30. What do baseline and strict static analysis do in dbt v2?

dbt v2 includes a SQL compiler that builds a logical plan for each model. The v2 GA post puts it plainly: if dbt cannot produce the plan, something is wrong with the query.

  • baseline (default): parses SQL at compile time without a warehouse connection and reports findings as warnings, so runs continue.
  • strict: resolves column types and validates references before execution, and is required for column-level lineage. Enable it with +static_analysis: strict, --static-analysis strict or DBT_STATIC_ANALYSIS=strict.

The older values on and unsafe are synonyms for strict and will be removed. The practical change for interviews: a typo in a column name used to surface only when the warehouse ran the query.

Under strict analysis it fails before any compute is spent. A strong candidate would adopt strict mode model by model, starting with marts, since models built from heavy Jinja or warehouse-specific functions may need fixes first.

Signs of a Strong Answer

  • They state the grain and the layer of a model before writing its SQL.
  • They explain how each incremental model handles late data, duplicates and a full refresh, with a number for the lookback.
  • They separate unit tests (logic, run in CI) from data tests (data quality, run after builds) and know which ones block a deploy.
  • They list snapshot check_cols explicitly and know the three hard_deletes options.
  • They can write the slim CI command from memory and explain when --defer reads production.
  • They know what dbt v2 removes and have a staged plan to get a 1.x project there.

Hiring dbt Developers

Analytics engineers who have owned a dbt project through a warehouse migration, cut a CI bill with state selection and debugged an incremental model at 6 a.m. are hard to find through job boards.

The data engineer role guide describes the broader job, and our data engineer, PostgreSQL and ClickHouse interview guides cover the layers around dbt.

Second Talent helps US startups hire vetted AI-Native Engineers from Asia, at $23 to $39 USD an hour billed monthly, with matches in 24 hours and a 90-day one-time replacement guarantee.

See data engineers for hire, compare rates on the cost to hire an analytics engineer page, or tell us what you need.

Get developers who ship with AI agents. Starts at $25/Hour.

Start Hiring $0 cost until you hire