Skip to content

Analytics Engineer interview questions

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

See a Analytics Engineer resume example

Practice with flashcards

Spaced repetition · Hunter Pass

Questions

An analytics engineer turns raw warehouse data into tested, documented models that people can use consistently.

  • Data engineers usually build ingestion and platform infrastructure that delivers data to the warehouse.
  • Data analysts usually interpret prepared data to answer questions and create reports.
  • Analytics engineers own the modeling layer between them through SQL, dbt, tests, documentation, and version control.

Why interviewers ask this: The interviewer is checking whether the candidate understands ownership of the trusted modeling layer.

Dimensional modeling organizes analytical data around measurable business events and their descriptive context.

  • Facts represent events or processes such as orders, payments, or page views.
  • Dimensions describe entities such as customers, products, channels, and dates.
  • The resulting structure supports understandable and consistent filtering, grouping, and aggregation.

Why interviewers ask this: The interviewer is evaluating whether the candidate knows the purpose and building blocks of dimensional models.

schemamodeling

A star schema places a central fact table around directly connected dimension tables.

  • The fact table stores rows at a declared grain together with measures and dimension keys.
  • Dimension tables provide descriptive attributes used to filter and group facts.
  • Its simple join structure is usually easy for analysts and BI tools to understand.

Why interviewers ask this: The interviewer is checking whether the candidate can describe the structure and value of a star schema.

schemamodelingsnowflake

A snowflake schema normalizes dimensions into related tables, while a star schema keeps dimensions more denormalized.

  • Snowflaking can reduce repeated attributes and represent hierarchies explicitly.
  • It also introduces more joins and can be harder for consumers to navigate.
  • A star commonly favors analytical simplicity, while a snowflake applies normalization to selected dimensions.

Why interviewers ask this: The interviewer is evaluating whether the candidate understands the structural difference and usability trade-off.

modeling

A fact table contains business events or process observations at one consistent grain.

  • Dimension keys connect each event to context such as customer, product, and date.
  • Measures capture values such as quantity, revenue, duration, or balance when appropriate.
  • An identifier such as an order number may remain in the fact table when it has no descriptive dimension.

Why interviewers ask this: The interviewer is checking whether the candidate can distinguish facts from descriptive dimension attributes.

modeling

A dimension table contains descriptive attributes that give business meaning to facts.

  • A customer dimension might include segment, country, acquisition channel, and status.
  • A dimension usually has a key referenced by one or more fact tables.
  • Its attributes support labels, filters, groups, and hierarchies rather than event measures.

Why interviewers ask this: The interviewer is evaluating whether the candidate understands dimensions as reusable analytical context.

modeling

The grain states exactly what one row in a fact table represents.

  • Examples include one row per order line, account per day, or support ticket.
  • Every measure and dimension key must be valid at that same level of detail.
  • A clear grain prevents mixed levels that cause duplication or incorrect aggregates.

Why interviewers ask this: The interviewer is checking whether the candidate treats grain as the foundation of a reliable fact model.

A measure is a numeric property of a fact, and it is additive when summing it across relevant dimensions remains meaningful.

  • Order quantity and line revenue are commonly additive across products, customers, and dates.
  • A balance is often semi-additive because it can be summed across accounts but not across time.
  • Ratios are usually non-additive and should often be calculated from component measures.

Why interviewers ask this: The interviewer is evaluating whether the candidate recognizes when aggregation preserves business meaning.

A natural key comes from the source business domain, while a surrogate key is generated for the analytical model.

  • An email or source customer ID can change in value or format.
  • A surrogate key gives the warehouse a stable identifier independent of source changes.
  • Surrogate keys support multiple historical versions of one dimension member.

Why interviewers ask this: The interviewer is checking whether the candidate understands why source and warehouse identities are separated.

A conformed dimension is shared with consistent keys and definitions across multiple fact tables or processes.

  • A common customer dimension can support both sales and support facts.
  • Shared attributes make filters and groups mean the same thing across reports.
  • Conformance enables reliable comparisons without redefining business concepts in every data mart.

Why interviewers ask this: The interviewer is evaluating whether the candidate understands how shared dimensions create consistency across domains.

A date dimension provides a consistent calendar vocabulary for analyzing facts over time.

  • It can include day, week, month, quarter, year, weekday, and holiday attributes.
  • Fiscal periods and business-specific calendars can be defined once and reused.
  • Facts join to it through a date key so reports apply the same time groupings.

Why interviewers ask this: The interviewer is checking whether the candidate knows why calendar logic belongs in a reusable dimension.

transactionsmodeling

A transaction fact table stores one row for each business event at its most atomic useful grain.

  • Examples include an order line, payment, shipment, or product click.
  • It usually contains event measures and keys to dimensions valid when the event occurred.
  • Atomic facts support flexible analysis because consumers can aggregate them differently.

Why interviewers ask this: The interviewer is evaluating whether the candidate recognizes the event-level fact pattern.

modelingsnapshot

A periodic snapshot fact table records the state of a process at regular intervals.

  • One row might represent an account balance per day or inventory per product per week.
  • Its grain includes the observed entity and the snapshot period.
  • Snapshot measures are often semi-additive because summing repeated states across time is misleading.

Why interviewers ask this: The interviewer is checking whether the candidate distinguishes state observations from transactions.

modelingsnapshot

An accumulating snapshot fact table tracks one process instance through several milestones.

  • A row can represent an order from placement through payment, shipment, and delivery.
  • Milestone dates and status fields are updated as the process advances.
  • Its grain is one row per process instance rather than one row per milestone.

Why interviewers ask this: The interviewer is evaluating whether the candidate understands the fact pattern for lifecycle analysis.

scd

Type 1 overwrites a changed attribute, while Type 2 preserves history by creating a new versioned row.

  • Type 1 suits corrections or attributes whose prior values are not analytically important.
  • Type 2 uses effective dates, a current indicator, or similar fields to define versions.
  • Facts can reference the surrogate key valid when the event occurred.

Why interviewers ask this: The interviewer is checking whether the candidate can explain the historical behavior of both SCD types.

sqlqueriesconcurrency

The useful logical order is FROM and JOIN, WHERE, GROUP BY, HAVING, SELECT, DISTINCT, ORDER BY, and LIMIT.

  • FROM and JOIN establish input rows before row-level filtering.
  • GROUP BY forms groups, and HAVING filters them before final projection.
  • Window functions are evaluated after grouping and HAVING but before the final result ordering.
  • Aliases created in SELECT may be unavailable to earlier logical stages.

Why interviewers ask this: The interviewer is evaluating whether the candidate can reason from logical SQL execution order.

queriesaggregation

WHERE filters rows before aggregation, while HAVING filters groups after aggregation.

  • A date or status condition on source rows normally belongs in WHERE.
  • A condition such as COUNT(*) greater than ten belongs in HAVING.
  • Filtering with WHERE changes which rows contribute to each aggregate.

Why interviewers ask this: The interviewer is checking whether the candidate places row-level and aggregate-level conditions correctly.

schemaaggregation

Each output group must have one unambiguous value for every selected expression that is not aggregated.

  • GROUP BY defines which input rows collapse into one result row.
  • A selected column that varies within a group has no single value to return.
  • Explicit grouping is clearer and more portable than relying on dialect-specific exceptions.

Why interviewers ask this: The interviewer is evaluating whether the candidate understands grouping keys and aggregate output.

fundamentals

Most SQL aggregates ignore NULL values, while COUNT(*) counts rows regardless of NULLs.

  • COUNT(column) counts only rows where that column is not NULL.
  • SUM(column) and AVG(column) use non-NULL values and can return NULL when none exist.
  • Replacing NULL with zero is valid only when zero has the correct business meaning.

Why interviewers ask this: The interviewer is checking whether the candidate can predict aggregates without changing the meaning of missing data.

joinsmonitoring

Join fanout occurs when a join creates multiple output rows for one row at the measure's grain.

  • Joining an order to several items repeats order-level columns once per item.
  • Summing repeated order revenue then overstates the true total.
  • Join cardinality and both input grains must be understood before aggregation.

Why interviewers ask this: The interviewer is evaluating whether the candidate recognizes duplication caused by joins.

Locked questions

  • 21

    When would you use an INNER JOIN instead of a LEFT JOIN?

    joins
  • 22

    What is a common table expression, or CTE?

    cte
  • 23

    How does a window function differ from GROUP BY?

    aggregationwindow-functions
  • 24

    What do PARTITION BY and ORDER BY do inside a window function?

    partitioningwindow-functions
  • 25

    How do ROW_NUMBER, RANK, and DENSE_RANK differ?

    window-functions
  • 26

    When are LAG and LEAD useful?

    window-functions
  • 27

    How do you calculate a running total with a window function?

    window-functions
  • 28

    What is conditional aggregation?

    aggregation
  • 29

    How should dates be grouped by month in analytical SQL?

    sql
  • 30

    What does COALESCE do, and when should it be used carefully?

    queries
  • 31

    What is a dbt model?

    dbt
  • 32

    What does ref do in dbt?

    dbt
  • 33

    What does source do in dbt?

    dbt
  • 34

    Why are staging, intermediate, and mart layers used in dbt projects?

    dbt
  • 35

    What are the main dbt materializations?

    dbt
  • 36

    What are generic data tests in dbt?

    genericsdbt
  • 37

    How does a singular data test differ from a generic data test in dbt?

    dbtgenerics
  • 38

    What should dbt documentation describe?

    documentationdbt
  • 39

    What is lineage in dbt, and how is it created?

    lineagedbt
  • 40

    What is a dbt exposure?

    dbt
  • 41

    What is a cloud data warehouse?

    warehouse
  • 42

    Why is columnar storage useful for analytics?

    schema
  • 43

    What concepts do Snowflake, BigQuery, and Redshift share?

    snowflakebigqueryredshift
  • 44

    What is the difference between ETL and ELT?

    etl
  • 45

    What is a data mart?

    data-marts
  • 46

    What is a semantic layer?

    semantic-layer
  • 47

    What is a metrics layer?

    monitoring
  • 48

    Why should analytics code be stored in Git?

    git
  • 49

    What should a pull request for an analytics model contain?

    code-review
  • 50

    What basic dimensions of data quality should an analytics engineer know?

    quality
  • 51

    You receive raw orders and order_items tables. How would you structure the first dbt models?

    dbt
  • 52

    How would you model fact_orders for a revenue dashboard?

  • 53

    How would you build a customer dimension from CRM and application user data?

  • 54

    Raw product events contain retries and duplicate event IDs. How would you build a clean events model?

  • 55

    How would you model source freshness for daily finance data loaded by Fivetran?

  • 56

    A join between orders and payments doubles revenue. How would you fix the model?

    joins
  • 57

    How would you design a star schema for a sales dashboard by product, customer, and day?

    schemamodelingdesign
  • 58

    Customers can belong to several marketing segments. How would you model that relationship?

  • 59

    How would you track changes to a customer's plan over time in dbt?

    dbt
  • 60

    A dashboard must show dates with zero orders. How would you model the result?

  • 61

    How would you write SQL for a running daily revenue total?

    sql
  • 62

    How would you select the latest status row for every order?

  • 63

    How would you calculate a seven-day moving average of signups?

  • 64

    How would you calculate a signup-to-purchase funnel from an events table?

    funnel
  • 65

    How would you build a monthly signup cohort retention table?

    retentioncohorts
  • 66

    How would you compare purchase conversion by acquisition channel?

  • 67

    How would you sessionize web events when no session ID exists?

    sessions
  • 68

    How would you calculate first-touch attribution from marketing events?

  • 69

    How would you calculate each product's percentage of monthly revenue?

  • 70

    How would you deduplicate customer records while keeping the best available row?

    queries
  • 71

    A conversion rate becomes null or infinite for small groups. How would you make the SQL safe?

    conversionsqlfundamentals
  • 72

    Daily signups differ between BigQuery SQL and a Looker dashboard. How would you check timezone handling?

    sqlbigquerybi
  • 73

    When would you make a dbt model incremental instead of rebuilding it as a table?

    dbt
  • 74

    How would you write the incremental filter for a model using updated_at?

  • 75

    Late-arriving events are missing from an incremental model. How would you fix it?

  • 76

    An incremental model creates duplicate orders after reruns. How would you fix it?

  • 77

    A new source column must be added to an existing incremental model. How would you release the change?

    schema
  • 78

    How would you backfill one year of data into an incremental model without one expensive full refresh?

    backfill
  • 79

    How would you check that a dbt model is idempotent?

    dbtidempotency
  • 80

    Which dbt tests would you add first to a new fact_orders model?

    dbt
  • 81

    A relationships test between orders and customers fails. How would you debug it?

  • 82

    A source adds a new order status and the accepted_values test fails. What would you do?

  • 83

    How would you write a singular dbt test for net revenue?

    dbt
  • 84

    A dbt source freshness check fails before the morning build. How would you respond?

    dbt
  • 85

    A unique test fails only in CI. How would you debug it?

  • 86

    How would you test that an order amount stays within a reasonable range?

  • 87

    How would you set up GitHub Actions checks for a dbt pull request?

    ci-cddbtcode-review
  • 88

    Two dashboards show different values for the same conversion metric. How would you reconcile them?

    monitoring
  • 89

    Finance says dbt revenue is higher than the payment processor total. How would you investigate?

    dbtconcurrency
  • 90

    Fivetran reports one million source rows but the staging model has fewer. How would you find the difference?

  • 91

    Funnel conversion drops suddenly after a tracking release. How would you debug it?

    funnel
  • 92

    Monthly active users differ between a user table query and an events query. How would you choose the correct calculation?

    queries
  • 93

    How would you expose a governed revenue metric to Looker or Lightdash?

    monitoringbi
  • 94

    What documentation would you add before publishing a dbt model to analysts?

    documentationdbt
  • 95

    How would you add a dbt exposure for an executive revenue dashboard?

    dbt
  • 96

    A pull request changes a shared customer model. How would you assess downstream impact?

    code-review
  • 97

    What would you check when reviewing a dbt model pull request?

    code-reviewdbt
  • 98

    You prototype a metric in Hex with DuckDB. How would you turn it into a production dbt model?

    monitoringdbtprototypes
  • 99

    An API source changes its OpenAPI schema. How would you update the analytics models safely?

    openapischema
  • 100

    How would you retire a dbt model that still has dashboards and notebooks downstream?

    dbt