Data engineering interview questions on pipeline quality and observability
Reviewed by Mark Dickie · Last updated
4 questions on this page you can answer and see marked on the spot. Go to the first one
Pipeline quality observability is the practice of checking that data arrives on time, in the expected volume, and in the expected shape, then alerting someone before downstream reports go wrong. Interviewers use it to see whether a candidate can tell a pipeline that succeeded from a pipeline that produced correct data. Most questions come down to four signals (freshness, volume, schema, and value distribution) and how you wire those checks into the scheduler so a failure stops bad data from reaching consumers.
Which signals should a pipeline quality check cover?
| Signal | What the check compares | Typical tool or mechanism |
|---|---|---|
| Freshness | Latest loaded_at timestamp against an SLA window | dbt source freshness with warn_after and error_after |
| Volume | Today's row count against a trailing baseline | dbt-expectations expect_table_row_count_to_be_between, or a custom SQL test |
| Schema drift | Column names and types against the agreed contract | dbt model contract with enforced: true, or schema snapshots |
| Uniqueness | Duplicate rows on the business key after a merge | dbt unique and not_null tests on the key |
| Referential integrity | Fact rows whose foreign key has no dimension match | dbt relationships test |
| Value distribution | Null rate or category mix against last week | Great Expectations suite, or an anomaly monitor such as Soda or Monte Carlo |
Freshness and volume checks are the cheapest place to start, since they need no knowledge of what the values mean. Schema and uniqueness checks come next because they catch changes that row counts hide.
How do you respond when a quality check fails?
- Stop the downstream task by failing the DAG run, so the BI refresh never reads the bad partition.
- Compare source and target row counts and max loaded_at for the same window to decide whether the fault is upstream or in your transform.
- Quarantine the bad rows in a separate table if the rest of the batch is valid, or reprocess the whole partition if it is not.
- Backfill the affected dates and re-run the checks, confirming the counts match the source.
- Add a test for the exact failure mode, so the same bug trips a check the next time it appears.
Key facts
- Tarmac has 37 Data Engineering interview questions on this topic, 10 of them on this page, at difficulty 1–5 of 5.
- Tarmac tracked 2,329 job postings asking for Data Engineering in November 2026.
- Roles asking for Data Engineering advertise a median base salary of £75,000, across 724 job postings as of November 2026.
- Tarmac last reviewed these Data Engineering interview questions on 16 November 2026.
At a glance
| Questions | 10 shown · 37 in the bank |
|---|---|
| Difficulty | 1–5 of 5 |
| Formats | True / false, Short answer, Ordering, Fill in the blank, Find the bug, Multiple choice, Code output, Multiple answer, Coding exercise |
| Interactive | 1 run your code against tests, in the app |
What you'll review
- data validation testing pipelines
- lineage observability de
Practice questions
Try one before you open the answer. Pick an option and press Check; it's marked on the spot.
In a data pipeline, a schema validation check is used to verify that incoming records match an expected structure — such as column names and data types — before the data is loaded downstream.#
Options
Show answer
True. Schema validation in a data pipeline checks that incoming records conform to an expected structure — column names, data types, and constraints — so that malformed data is caught before it reaches downstream consumers.
Schema validation confirms that incoming data conforms to a predefined schema: expected column names, data types, and constraints. This catches structurally incompatible records early so they don't propagate downstream and cause silent errors in dependent tables or analytics.
In a data pipeline, what is data validation, and what kinds of rules does it check on incoming records before they are loaded into downstream tables?#
Show answer
Data validation checks incoming data against defined quality rules, such as schema conformity, nullability, value ranges, and uniqueness, so that bad records are caught before they reach downstream systems.
Data validation means running explicit checks on incoming records against expected rules (schema, null constraints, value ranges, uniqueness) before loading, so invalid or unexpected data is caught early instead of propagating to tables, dashboards, or models. A strong answer names both the purpose (catching bad data before it propagates) and concrete rule types.
In a data engineering pipeline, what is the purpose of data validation checks, and what kinds of rules do they typically enforce?#
Show answer
Data validation checks verify that ingested data conforms to defined quality rules before it reaches downstream systems. Typical rules include schema conformance (expected column names), column data types, nullability constraints, allowed value ranges, and uniqueness of keys.
Data validation checks verify that ingested data conforms to expected quality rules before it reaches downstream systems, so bad records are caught before they corrupt consumers. The typical rules are structural and content-level: column names and schema, data types, nullability, allowed value ranges, and uniqueness. Encrypting sensitive columns is a security concern, scheduling runs is orchestration, and aggregating raw events into dashboards is transformation, so none of those count as validation.
Put these steps in the order a data engineer should follow to trace a wrong dashboard number back to the pipeline that produced it, using data lineage and observability tools.#
Put these in order
Show answer
To trace a wrong dashboard number, first note the suspicious tile and its value, then use the lineage graph to list upstream tables. Check those tables for the first divergence, inspect the pipeline run that wrote it, and only then fix the transformation and backfill affected partitions.
The investigation moves from symptom to source and then to remediation. You first identify the specific dashboard tile showing the bad value, because that defines what to investigate. Next you use the lineage graph to enumerate the upstream tables that feed it. You then check those tables for the first point where data diverges from expectations, since that narrows the search to one dataset. Only after locating that table do you inspect the pipeline run that wrote it. The fix and backfill come last, because you cannot correctly repair the transformation or know which partitions are affected until the faulty stage has been identified.
In a dbt schema.yml file (dbt Core v1.7), the built-in generic test that verifies every value in a column is distinct is named _____, and the built-in generic test that ensures a column's values exist as a foreign key in another model is named _____.#
Show answer
In a dbt schema.yml file (dbt Core v1.7), the built-in generic test that verifies every value in a column is distinct is named unique, and the built-in generic test that ensures a column's values exist as a foreign key in another model is named relationships.
dbt ships with four built-in generic tests: unique (all values in a column are distinct), not_null (no nulls), accepted_values (values belong to an allowed set), and relationships (referential integrity, where each value in the child column exists in the parent model's column). The unique test covers the distinctness constraint, and relationships covers the foreign-key constraint.
Consider the following Python snippet from a data validation step in an ETL pipeline. The pipeline should fail the load stage when the user_id column contains any null values, but currently it never raises an error even when nulls are present. Identify the buggy line (1-based line numbers).#
import pandas as pd
def validate_user_ids(df: pd.DataFrame) -> None:
nulls = df[df['user_id'].isna()]
if len(nulls) == 0:
raise ValueError('user_id contains null values')Show answer
The bug is on line 5.
The buggy line is the if len(nulls) == 0: condition on line 5. The filter on line 4 correctly selects the rows where user_id is null, so nulls holds those rows. The condition len(nulls) == 0 is True only when no nulls were found, so the ValueError is raised exactly when the data is clean, and never when nulls are present. Changing the comparison to len(nulls) > 0 (or if not nulls.empty:) makes the error fire when nulls exist.
Which statement correctly describes the purpose of data freshness monitoring in a data observability tool such as Monte Carlo?#
Options
Show answer
Data freshness monitoring checks whether new data has arrived in a table within an expected time window, alerting when the table is stale or delayed. It compares the most recent load or event timestamp against the current time and historical patterns, so a broken upstream pipeline gets flagged. It does not check nulls, duplicates, or value distributions, which are separate data-quality dimensions.
Freshness monitoring tracks how recent the data in a table is, typically by comparing the maximum load-time or event-time timestamp against the current time and against historical arrival patterns. If no new data lands within the expected window, the tool alerts that an upstream pipeline may be broken. The option about NULL values describes completeness checks, the option about repeated primary-key values describes uniqueness checks, and the option about value distributions describes distribution monitoring. Those are separate data-quality dimensions, so none of them is the purpose of freshness monitoring.
What does the following Python code print?#
def validate_volume(actual, expected, tolerance_pct):
if expected == 0:
return "PASS" if actual == 0 else "FAIL"
lower = expected - expected * tolerance_pct / 100
upper = expected + expected * tolerance_pct / 100
if actual < lower:
return "FAIL"
if actual > upper:
return "FAIL"
return "PASS"
print(validate_volume(95000, 100000, 5))Show answer
PASS
The call passes actual=95000, expected=100000, tolerance_pct=5. Because expected is non-zero, the early return is skipped. The bounds are computed as lower = 100000 - 5000.0 = 95000.0 and upper = 100000 + 5000.0 = 105000.0; these multiplications and divisions are exact in floating point. The first check, 95000 < 95000.0, is False because the comparison is strict, so the lower boundary is accepted. The second check, 95000 > 105000.0, is also False. Neither failure branch runs, so the function returns "PASS", which the print statement outputs. The boundary is inclusive because both checks use strict inequalities.
A team is building a streaming pipeline: CDC events land in Kafka topics, a stream processor (Flink or Spark Structured Streaming) consumes them, applies light transformations, and writes to a partitioned data lake. Which of the following are well-established, practical data quality validation and observability strategies for this architecture? Select all that apply.#
Options
Pick every one that applies.
Show answer
Schema registry enforcement on Kafka topics, per-window column statistics compared against baselines, and dead-letter queues with failure-volume alerting are well-established validation and observability strategies for streaming pipelines. Each catches bad data at a different stage: ingestion, content drift, or per-record failures. Full-table reconciliation after every micro-batch is prohibitively expensive at that cadence.
The three well-established strategies are enforcing schema compatibility at the topic level with a schema registry (rejects malformed or incompatible records at ingestion), computing windowed column-level statistics such as null rate and distinct-count ratio against baselines to detect anomalies (a standard streaming observability pattern), and routing failing records to a dead-letter queue with volume-based alerting (a standard error-handling pattern in stream processors). Full-table reconciliation after every micro-batch is not practical because the source is a changelog rather than a static snapshot, the destination is continuously appended to, and full scans at micro-batch cadence are prohibitively expensive; incremental or watermark-based checks are the streaming-appropriate alternative. Silently dropping records with null keys without logging or metrics removes all visibility into data loss, so it is the opposite of observability.
You are building impact analysis for a data lineage graph. edges is a list of [upstream, downstream, kind] triples, where kind is either "sql" or "manual". Only "sql" edges represent automated data flow, so only they propagate impact. Write impacted_datasets(edges, changed) that returns a sorted list (ascending, by string comparison) of every dataset reachable from any dataset in changed by following one or more "sql" edges, transitively. Rules: a dataset in changed is included in the result only if it is reachable from some changed dataset via at least one "sql" edge (for example, through a cycle). The lineage graph may contain cycles, so traversal must terminate. Duplicate edges are allowed. If changed is empty, return an empty list.#
Starter code
def impacted_datasets(edges, changed):
# TODO: traverse the lineage graph transitively over sql edges
result = set()
for up, down, kind in edges:
if up in changed:
result.add(down)
return sorted(result)
Your solution must pass
- transitive sql chain with manual edge ignored
- middle node impacts only its descendants
This one is written and run, not read. Solve it in the app and your code is executed against these tests and the hidden ones.
Related interview questions
Job market
See data-engineering salaries and hiring demand from live job postings.
The other 27 questions
This page shows 10 and marks what you pick. That's as far as a page can go. A free account opens the other 27 and keeps every answer. What you miss comes back until it's right: after a day, then at longer gaps.
Free · the whole bank · 100 answers per 30 days, each marked with written feedback