Skip to content

Analytics Engineer interview questions

100 real questions with model answers and explanations for Middle candidates.

See a Analytics Engineer resume example

Practice with flashcards

Spaced repetition · Hunter Pass

Questions

dbt

A layered dbt project gives each model one clear responsibility and limits coupling between raw sources and consumers.

  • Staging models rename, cast, and lightly standardize one source relation without embedding business aggregates.
  • Intermediate models express reusable joins or transformations that are too specific to expose directly to BI.
  • Mart models publish business-grain facts and dimensions with stable names, tests, documentation, and contracts.
  • Consumers should depend on marts rather than source-shaped staging models so upstream schema changes remain contained.

Why interviewers ask this: The interviewer is evaluating whether you can structure a maintainable dbt dependency graph rather than merely split SQL across files.

dbt

Choose materialization from query cost, rebuild frequency, downstream latency, and the need for a physical relation.

  • A view suits lightweight logic that should always reflect current upstream data but shifts compute to every consumer query.
  • A table suits expensive transformations when full rebuild cost is acceptable and fast downstream reads matter.
  • An incremental model limits processing to changed data but requires a reliable change boundary and idempotent update logic.
  • An ephemeral model inlines reusable SQL as a CTE, avoiding storage while potentially producing large compiled queries.

Why interviewers ask this: A strong answer treats materialization as a cost and correctness decision rather than a fixed project convention.

dbt

An ephemeral model is a poor choice when inlining obscures lineage, duplicates expensive work, or creates an unwieldy compiled query.

  • Every dependent model receives the ephemeral SQL as a CTE, so shared expensive logic can be recomputed many times.
  • Deep chains can exceed warehouse query complexity limits and make execution plans harder to interpret.
  • Ephemeral models cannot be queried directly for validation or consumed by tools that require a physical relation.
  • A view or table is preferable when reuse, observability, or independent access outweighs avoiding storage.

Why interviewers ask this: The interviewer wants to see whether you understand the operational consequences of dbt compilation and not only the absence of a stored relation.

distinctwarehousedbt

Jinja renders SQL and builds the graph before the resulting statement runs in the warehouse.

  • Functions such as ref, source, var, and config are resolved while dbt compiles the model.
  • A run_query call needs an active warehouse connection and should be guarded with execute when parsing must remain safe.
  • SQL expressions in the rendered output are evaluated by the warehouse, not by Jinja.
  • Confusing the phases can produce environment-dependent manifests or macros that fail during parse-only commands.

Why interviewers ask this: This question checks whether the candidate can reason precisely about dbt parsing, compilation, and execution phases.

algorithmsoopdbt

A good dbt macro centralizes a stable transformation pattern while keeping its inputs, output SQL, and side effects explicit.

  • It should remove meaningful duplication, not hide a short expression that is clearer inline.
  • Parameters should represent business or adapter variation without accepting arbitrary fragments that are hard to validate.
  • The compiled SQL must remain readable because reviewers and warehouse optimizers operate on the rendered statement.
  • Macro behavior should be covered by representative models or unit tests and documented where its contract is not obvious.

Why interviewers ask this: The interviewer is assessing abstraction judgment and whether maintainability survives beyond reducing repeated text.

warehousedbt

Adapter dispatch selects a warehouse-specific macro implementation behind one shared interface.

  • The caller invokes a generic macro name while dbt searches the configured namespaces and current adapter implementation.
  • A default implementation can express portable SQL, with BigQuery or Snowflake variants only where syntax or behavior differs.
  • Dispatch keeps conditional adapter checks out of business models and allows projects to override package behavior deliberately.
  • Portability still requires tests on each supported adapter because equivalent syntax can have different types or null semantics.

Why interviewers ask this: A strong answer explains both the dispatch mechanism and the limits of claiming cross-warehouse portability.

dependenciesdbtdecision-making

A dbt package should be treated as versioned production code with a narrow, reviewed reason for adoption.

  • Evaluate whether its macros solve recurring needs, compile efficiently on the target adapter, and expose stable interfaces.
  • Pin compatible versions in package dependencies and review release notes before upgrades to avoid unplanned SQL changes.
  • Test package upgrades in CI against representative models and inspect compiled SQL for high-impact macros.
  • Prefer local project code when the dependency is large, weakly maintained, or used for only one simple transformation.

Why interviewers ask this: The interviewer checks whether the candidate balances reuse against dependency, compatibility, and maintenance risk.

dbt

dbt seeds are appropriate for small, slowly changing reference datasets that belong in version control.

  • Good examples include country mappings, controlled category lists, and test fixtures reviewed with the project.
  • Column types should be configured explicitly when warehouse inference could change codes, dates, or leading zeros.
  • Large, sensitive, frequently updated, or externally owned datasets belong in an ingestion process rather than a CSV commit.
  • A seed still needs ownership, tests, and a change process because downstream models may treat it as a contract.

Why interviewers ask this: This tests whether the candidate can distinguish governed reference data from a convenient but unsuitable ingestion shortcut.

snapshotdbt

The timestamp strategy detects changes through a reliable updated_at column, while the check strategy compares selected source columns.

  • Timestamp is simpler and scales well when every relevant update advances a trustworthy source timestamp.
  • Check is useful without such a timestamp but requires deliberate check_cols selection and more comparison work.
  • Including volatile or irrelevant columns in check_cols creates unnecessary historical versions.
  • Neither strategy is safe if source corrections can arrive without changing the timestamp or compared values.

Why interviewers ask this: The interviewer is evaluating whether you can select snapshot change detection from source guarantees rather than preference.

snapshotdbt

A dbt snapshot stores version intervals using dbt_valid_from and dbt_valid_to, with configurable handling for deleted source rows.

  • A new detected version closes the previous interval and inserts the current state for the same unique key.
  • The unique key must identify one logical entity consistently or history will split or overwrite incorrectly.
  • Hard deletes can be ignored, invalidated, or represented as new records depending on snapshot configuration and dbt version.
  • Downstream joins must use event time within the validity interval when historical attribution is required.

Why interviewers ask this: A strong answer connects snapshot metadata to correct temporal joins and explicit deletion semantics.

dbtidempotency

An incremental model is idempotent when rerunning the same input window produces the same target rows without duplicates or drift.

  • Its unique_key must match the output grain and the selected strategy must update or replace rows at that grain.
  • The incremental predicate should include all records that can change, usually with a bounded overlap for late arrivals.
  • Transformations should avoid run-time-dependent values unless those values are stable or intentionally persisted.
  • Reprocessing an overlap must be safe, which generally rules out blind append for mutable events.

Why interviewers ask this: The interviewer checks whether the candidate sees incrementality as a correctness contract and not only a performance optimization.

Incremental strategies differ in the target region they rewrite and the guarantees they require from keys or partitions.

  • Append only inserts selected rows, making it cheapest for immutable data and unsafe for updates or duplicate reprocessing.
  • Merge updates matched unique keys and inserts new ones, while delete plus insert replaces matching keys with broader adapter compatibility.
  • Insert overwrite replaces complete partitions and works well when partitions are reliable units of recomputation.
  • Microbatch divides a time range into bounded batches, improving restartability and parallelism for very large event datasets.

Why interviewers ask this: A strong answer chooses a strategy by mutation pattern, warehouse support, and recomputation boundary.

An incremental model should reprocess a deliberate overlap or derive changes from a reliable update signal instead of filtering only on the latest event time.

  • A lookback window captures delayed events but its duration must reflect measured lateness and accepted cost.
  • An updated_at or change-data-capture sequence can target mutations more precisely when the source guarantees completeness.
  • Merge or partition replacement must reconcile reprocessed rows at the model grain to prevent duplicates.
  • Periodic full reconciliation can bound residual drift that falls outside the chosen change window.

Why interviewers ask this: The interviewer is evaluating how the candidate balances freshness, correctness, and warehouse cost for mutable data.

dbt

on_schema_change defines how dbt reconciles selected model columns with an existing incremental target, not how it backfills values.

  • ignore leaves the target schema unchanged, while fail stops the run when a difference is detected.
  • append_new_columns adds newly selected columns without removing old ones.
  • sync_all_columns aligns additions, removals, and supported type changes but can be expensive on some warehouses.
  • Existing rows may still contain null or old values in new columns, so a full refresh or explicit backfill remains a separate decision.

Why interviewers ask this: A strong answer distinguishes schema reconciliation from historical data recomputation.

dbt

A full refresh is justified when the target can no longer be made correct by processing only a bounded change set.

  • Examples include changed historical business logic, a repaired source history, or a new column requiring values for all prior rows.
  • The team should estimate runtime, warehouse cost, locking behavior, and downstream availability before rebuilding a large relation.
  • Partition-scoped recomputation is preferable when it can restore correctness without replacing the entire table.
  • Full-refresh protection can prevent accidental rebuilds while a documented procedure makes intentional refreshes reproducible.

Why interviewers ask this: The interviewer checks whether the candidate can separate correctness-driven rebuilds from routine use of an expensive escape hatch.

dbt

A dbt model contract enforces the declared output column names and supported data types when the model is built.

  • It gives downstream consumers an explicit structural interface and makes incompatible schema changes fail early.
  • Constraints can be declared, but actual enforcement varies by warehouse and constraint type.
  • Contracts do not prove semantic correctness, freshness, uniqueness, or accepted values without additional tests and SLAs.
  • Versioned models are appropriate when an intentional breaking interface must coexist with current consumers during migration.

Why interviewers ask this: The interviewer is evaluating whether the candidate understands both the value and the boundary of schema contracts.

dbt

A useful dbt exposure records a real downstream asset, its dependencies, owner, type, and business criticality.

  • depends_on should reference the models or metrics that truly feed the dashboard, notebook, application, or reverse-ETL sync.
  • Ownership and maturity make lineage actionable by showing who approves changes and how carefully the asset must be protected.
  • Health links or URLs connect generated documentation to the consumer and its monitoring surface.
  • Exposure coverage becomes valuable when CI uses lineage to identify impacted consumers rather than when entries are merely decorative.

Why interviewers ask this: A strong answer treats exposures as enforceable downstream contracts instead of passive documentation.

Source freshness thresholds should derive from when a consumer needs trustworthy data and how often the source is expected to load.

  • warn_after can flag early degradation, while error_after represents a missed commitment that should fail the relevant check.
  • loaded_at_field must represent ingestion availability rather than an unrelated business event timestamp.
  • Thresholds should account for source cadence, timezone, weekends, and known delivery windows instead of using one global value.
  • Exposures connect each freshness rule to the dashboards, Hex analyses, or reverse-ETL audiences whose SLA depends on it.

Why interviewers ask this: The interviewer checks whether the candidate can turn dbt freshness configuration into a consumer-facing reliability commitment.

dbt

Slim CI compares the current project with a prior manifest, builds changed nodes and selected dependents, and defers unchanged references to an existing environment.

  • State selectors such as state:modified identify graph or configuration changes recorded in artifacts.
  • The plus operator can include downstream children whose behavior may change because an ancestor changed.
  • defer resolves unbuilt ref calls against a stable comparison environment, avoiding a full warehouse rebuild in CI.
  • CI must use compatible manifests and account for macros, seeds, variables, and indirect test selection that can broaden impact.

Why interviewers ask this: A strong answer explains how artifacts and lineage reduce CI work without weakening change coverage.

dbt

dbt Core supplies the command-line transformation framework, while dbt Cloud adds a managed control plane for development, scheduling, metadata, and governed execution.

  • Core offers deployment flexibility but leaves orchestration, credentials, artifact storage, and the development environment to the team.
  • Cloud provides managed jobs, an IDE, environment controls, logs, and platform features whose availability depends on the plan.
  • Both execute dbt projects against the warehouse, so model design and SQL performance remain the team's responsibility.
  • The choice should reflect governance, integration, cost, and operational ownership rather than assuming one changes dbt semantics.

Why interviewers ask this: The interviewer is assessing practical platform understanding without reducing the comparison to hosted versus local execution.

Locked questions

  • 21

    Why must the grain of a fact table be declared before its dimensions and measures?

    modeling
  • 22

    When should a dimension use SCD Type 1?

  • 23

    How does SCD Type 2 preserve history, and what makes its implementation correct?

  • 24

    When is SCD Type 3 useful compared with Type 1 or Type 2?

  • 25

    When does a many-to-many relationship require a bridge table in dimensional modeling?

  • 26

    What is a factless fact table, and when is it preferable to adding flags to a dimension?

    modeling
  • 27

    How do periodic snapshot and accumulating snapshot fact tables differ?

    modelingsnapshot
  • 28

    What are conformed and role-playing dimensions, and why do they matter?

  • 29

    What responsibilities belong in a semantic layer rather than individual dashboards?

    semantic-layer
  • 30

    How should metric additivity influence semantic-layer design?

    designmonitoring
  • 31

    How do semantic models, entities, and metrics work together in MetricFlow?

    monitoring
  • 32

    How should Cube pre-aggregations be designed for performance without losing semantic correctness?

    aggregationdesignperformance
  • 33

    How can one governed metric remain consistent across Looker and Hex?

    monitoringbi
  • 34

    What contract should exist between an analytics model and a reverse-ETL sync?

    etl
  • 35

    How should an Airflow DAG for dbt workloads define task boundaries?

    dbtairflow
  • 36

    When should Airflow use time schedules, sensors, or dataset-aware scheduling?

    jobsairflow
  • 37

    How does Dagster's asset model differ from task-centric orchestration?

    orchestration
  • 38

    What makes retries and backfills safe in an analytics orchestration workflow?

    orchestrationbackfill
  • 39

    How do materialization and incrementality trade storage for compute in a cloud warehouse?

    warehouse
  • 40

    How should partitioning and clustering be chosen for a large BigQuery table?

    partitioningbigqueryclustering
  • 41

    Which query and model design choices reduce BigQuery cost at scale?

    queriesbigquerydesign
  • 42

    How do Snowflake micro-partition pruning and clustering keys interact?

    partitioningsnowflakeclustering
  • 43

    How should Snowflake virtual warehouse sizing and scaling be approached for analytics workloads?

    warehousesnowflakescaling
  • 44

    How should generic, singular, and unit tests be combined in dbt?

    unitgenericsdbt
  • 45

    When does Great Expectations add value beyond dbt tests?

    dbtdata-qualitytesting
  • 46

    What does Elementary add to a dbt-based data quality stack?

    qualitydbt
  • 47

    Which data quality dimensions should an analytics platform measure?

    quality
  • 48

    What should an analytics CI/CD pipeline validate before merging a dbt change?

    ci-cddbtvalidation
  • 49

    How should dbt environments and artifacts support promotion from CI to production?

    dbtartifacts
  • 50

    How should severity and thresholds be chosen for data quality checks and freshness SLAs?

    qualityseverity-priority
  • 51

    How would you model monthly recurring revenue from subscription lifecycle events?

  • 52

    How would you model orders, payments, refunds, and chargebacks without duplicating revenue?

  • 53

    How would you join facts to a slowly changing customer dimension as of the event date?

    joinsscd
  • 54

    How would you define a revenue metric in Cube or the dbt semantic layer for use across BI tools?

    monitoringdbtsemantic-layer
  • 55

    How would you build a reusable identity map when users appear under device, account, and CRM identifiers?

  • 56

    A source provides current account state plus an incomplete event log. How would you model history?

  • 57

    Two dbt domains need the same customer model but follow different release schedules. How would you set the contract?

    dbt
  • 58

    How would you model revenue reported in many currencies?

  • 59

    How would you build a daily inventory snapshot from stock movement events?

    snapshot
  • 60

    How would you prepare a customer audience model for reverse ETL through Hightouch or Census?

    etl
  • 61

    A join across orders, items, and promotions inflates gross merchandise value. How would you debug it?

    joins
  • 62

    An incremental dbt model suddenly creates duplicate customer records. How would you find the cause?

    dbt
  • 63

    Rows disappear somewhere between an Airbyte source and a dbt mart. How would you trace them?

    dbt
  • 64

    An upstream API changes a nested field from an object to an array. How would you update the pipeline?

    ci-cdapi
  • 65

    Facts arrive before their dimension records and relationships tests fail. How would you model late-arriving dimensions?

    testing
  • 66

    Fivetran history tables show more records than the source application. How would you reconcile the counts?

  • 67

    A critical dbt test fails during the production job. How would you triage the data-quality incident?

    incidentsdbt
  • 68

    Looker and a Hex notebook disagree on active customers. How would you resolve the discrepancy?

    conflictbi
  • 69

    A reverse-ETL audience has 20 percent fewer users in the destination than in dbt. How would you debug it?

    etldbt
  • 70

    Daily metrics shift by one day for some regions. How would you debug the timezone issue?

    monitoring
  • 71

    A BigQuery dbt model scans several terabytes for one day of data. How would you optimize it?

    bigqueryoptimizationdbt
  • 72

    A Snowflake query spills to remote storage and runs slowly. How would you tune it?

    queriessnowflake
  • 73

    A warehouse join is slow because both inputs are very large. How would you reduce its cost?

    joinswarehouse
  • 74

    A dbt model is ephemeral and gets inlined into many expensive downstream queries. What would you change?

    queriesdbt
  • 75

    The dbt job takes two hours although most models are small. How would you find the critical path?

    schedulingcommunicationdbt
  • 76

    An incremental model misses updates that arrive several days late. How would you correct it?

  • 77

    How would you propagate source deletions through an incremental dbt model?

    dbt
  • 78

    A schema change requires rebuilding a large incremental table. How would you avoid an unsafe full refresh?

    schema
  • 79

    How would you backfill two years of events without disrupting daily warehouse workloads?

    warehousebackfill
  • 80

    A dbt snapshot grows rapidly and contains frequent false changes. How would you fix it?

    snapshotdbt
  • 81

    How would you design dbt CI so a pull request tests changed models without rebuilding the warehouse?

    code-reviewdesigntesting
  • 82

    An upstream team wants to rename a column used by many dbt models. How would you manage the change?

    schemadbt
  • 83

    A source freshness SLA fails, but the dbt transformations succeeded. What would you do?

    dbt
  • 84

    Elementary reports an unusual drop in daily rows. How would you decide whether it is a real incident?

    incidents
  • 85

    How would you introduce strict data tests to a legacy mart with many existing failures?

    testing
  • 86

    A dbt deployment changes executive revenue unexpectedly. How would you roll it back and recover?

    deploymentdbt
  • 87

    You own an Airbyte or Fivetran connector that repeatedly misses its sync window. How would you improve reliability?

  • 88

    How would you configure dbt Cloud environments for development, CI, and production?

    configdbt
  • 89

    A Cube dashboard issues expensive repeated queries. How would you improve semantic-layer performance?

    queriesperformance
  • 90

    A Looker dashboard is slow although each tile seems simple. How would you investigate it?

    bi
  • 91

    Warehouse spend doubles after several new dbt jobs are added. How would you find and control the cost?

    warehousedbt
  • 92

    How would you choose partitioning and clustering for a large event mart?

    clusteringpartitioning
  • 93

    Finance reports a different monthly revenue total from the analytics mart. How would you reconcile it?

  • 94

    The business changes the definition of an active account. How would you update the metric without confusing historical reports?

    monitoring
  • 95

    A source outage leaves six hours missing from an event table. How would you recover the downstream models?

  • 96

    Marketing requests sensitive customer attributes in a reverse-ETL sync. How would you respond?

    etl
  • 97

    An analyst builds a valuable metric in Hex. How would you productionize it?

    monitoring
  • 98

    How would you migrate a dbt project from BigQuery to Snowflake without changing metric results?

    snowflakebigquerymonitoring
  • 99

    A product team adds a new version of an event with different properties. How would you evolve the analytics model?

  • 100

    A stakeholder needs an urgent metric tomorrow, but one source is incomplete. How would you deliver responsibly?

    stakeholder-managementcommunicationmonitoring