Data engineer interviews should test whether candidates can move data reliably, model it at the right grain and prove what happens when inputs arrive late or jobs fail partway through. A good answer explains why a pipeline is correct, not just which warehouse, orchestrator or streaming engine it uses.
These 120 questions progress from ingestion and SQL fundamentals to dimensional modeling, change data capture, orchestration, streaming, data quality and recovery. They include small SQL exercises and complete pipeline scenarios so interviewers can assess both implementation and engineering judgment.
How can you tell whether a candidate can explain the data pipeline they just designed?
Ask what they would check if a retry doubled one customer’s totals or a source went offline halfway through a batch. In remote interviews, Sherlock AI can help reviewers examine evidence of possible AI-assisted cheating, deepfakes, impersonation or other unauthorized assistance alongside that technical reasoning.
Data Engineer Interview Questions
Use this question bank to select an interview progression suited to the candidate’s experience and the role’s responsibilities.
Data Engineer Interview Questions for Beginners
Start with data flow, storage, modeling, change capture and basic validation.
What does a data engineer do?
How does data engineering differ from data analytics?
What are the basic stages of a data pipeline?
What is the difference between ETL and ELT?
How does batch processing differ from stream processing?
What is a data warehouse?
What is a data lake?
How does a lakehouse differ from a collection of data files?
What does OLTP versus OLAP mean?
What is the grain of a table?
What are facts and dimensions?
How does a star schema help analytical queries?
Why use surrogate keys as well as natural keys?
What is the difference between a primary key and a foreign key?
What is schema inference and where can it go wrong?
What is a data contract?
When should you choose Parquet instead of CSV?
What is the difference between JSON and newline-delimited JSON?
What is the difference between partitioning and indexing?
What is partition pruning?
Why do many small files hurt analytical pipelines?
How does compression interact with storage format?
What is staging in a data pipeline?
What is an incremental load?
What is a full refresh?
What is change data capture?
What makes a data pipeline idempotent?
What is backfilling, and when would you do it?
What does pipeline orchestration do?
What does a DAG represent in data engineering?
How do scheduled time and data interval differ?
What is the difference between event time and ingestion time?
What are late-arriving records?
How is freshness different from completeness?
What is a basic data quality check suite?
What is data lineage?
What is a data catalog used for?
What is the difference between a null and a default value in analytics?
How would you test a simple data transformation?
What is a useful beginner data engineer interview exercise?
Data Engineer Interview Questions for Intermediate
Move from definitions to decisions about keys, windows, safe writes, orchestration and reconciliation.
How do you detect join fan-out in a fact pipeline?
When would you use a left anti join in data validation?
How would you deduplicate an event feed deterministically?
What are Type 1 and Type 2 slowly changing dimensions?
How would you build an effective-dated dimension join?
When is a snapshot fact preferable to an event fact?
Why distinguish additive and non-additive measures?
How would you model a many-to-many relationship in analytics?
How do you choose between append, upsert and replace-by-partition?
How do you choose a cursor for incremental extraction?
What is the difference between a source offset and an event ID?
How do you avoid missing changes during an initial CDC snapshot?
How should delete events be represented downstream?
What do at-least-once and exactly-once mean for data pipelines?
How do you reason about ordering guarantees in a partitioned event log?
What is a watermark and why does it matter for state?
How do tumbling and sliding time windows differ?
How would you handle a batch whose source data is partial?
How do you test a backfill without risking live data?
How can orchestration retries cause incorrect data?
What should determine task boundaries in an orchestration workflow?
When should a scheduler wait for source data rather than run only by clock?
What causes small files during writes, and how can you reduce them?
How do you choose partition keys for a curated analytical table?
How do column pruning and predicate pushdown differ?
When is the shuffle an important data engineering bottleneck?
How do you choose a conflict policy for an incremental upsert?
What makes a warehouse transformation reproducible?
Why can schema evolution be compatible syntactically but still break consumers?
How would you quarantine bad records without hiding failures?
How would you reconcile source and destination records after migration?
How do you validate delete and update handling in CDC tests?
What should an observable data pipeline record at each run?
How do a freshness objective and an availability objective differ?
How would you secure a data pipeline without stopping useful access?
What factors matter when choosing a warehouse versus a lake table?
How do you choose between a daily rebuild and incremental merge?
What is the difference between data validation and data reconciliation?
How do you design a reliable file ingestion manifest?
How should you document a dataset for downstream users?
Data Engineer Interview Questions for Experienced
Use these scenarios to probe operational judgment, recovery design and correctness under load.
How would you design an order pipeline from creation through warehouse reporting?
How do you design a pipeline for a tenfold traffic increase?
How do you recover data after a source outage longer than log retention?
How would you repair a corrupt pipeline output while new data keeps arriving?
How do you prove a backfill did not break an unaffected interval?
How would you redesign a pipeline that takes longer to run than its scheduling interval?
How do you design idempotency across multiple systems with different transaction guarantees?
How would you choose between an outbox and direct dual writes?
How do you keep a CDC sink consistent when events arrive out of order?
How would you evolve a streaming schema without breaking live consumers?
How would you change the key used to partition a live event topic?
How do you diagnose a large lag increase in a streaming pipeline?
How do you design overload behavior for a streaming ingestion service?
How would you handle increasing state size in event-time processing?
What does an end-to-end exactly-once claim need to specify?
How do you choose a strategy for late facts in a dimensionally modeled warehouse?
How do you repair wrong Type 2 dimension history?
How would you handle reconciliation discrepancies with equal global totals?
How do you design end-to-end lineage for reproducibility?
How would you choose a data quality SLO for a high-impact table?
When should a data quality issue block publication instead of alerting only?
How do you make alerts for data freshness actionable?
How would you investigate a sudden warehouse cost increase?
How would you optimize a data workflow constrained by hot keys?
How would you select a file compaction strategy for a table with continuous writes?
How would you roll out a table format migration to multiple engines?
Why can restoring an old table snapshot be operationally risky?
How do you design disaster recovery for an analytical pipeline?
How would you minimize sensitive data in a new analytical dataset?
How would you design a deletion process across derived tables and backups?
How do you migrate a pipeline from batch to streaming without changing the business metric?
How would you implement blue-green deployment for a data pipeline?
How would you choose between a big redesign and incremental repair after incidents?
How do you test migration performance without distorting production workloads?
What should a data-engineering incident runbook contain?
How would you reduce pipeline cost without missing freshness objectives?
How do you define ownership for a shared data platform?
How would you balance self-service analytics with consistent definitions?
What would you ask before selecting tools in a data engineer system design interview?
How would you demonstrate that a pipeline is ready for production?
Data Engineer Interview Questions and Answers
Use the answers as calibration, not a script. Give credit for alternatives that state their assumptions and make failure and recovery behavior explicit.
Data Engineer Interview Questions and Answers for Beginners
Look for clear definitions and examples that distinguish storage, business meaning and workflow behavior.
1. What does a data engineer do?
A data engineer builds and operates systems that turn source data into reliable inputs for analytics, reporting or downstream products. The work includes ingestion, transformation, modeling, orchestration and quality controls, not just writing queries.
For example, a sales dashboard needs stable definitions, predictable refresh and a way to repair missing days. The engineer owns or coordinates these contracts and recovery paths rather than treating a pipeline as complete as soon as one run succeeds.
2. How does data engineering differ from data analytics?
Data engineering focuses on reliable collection, processing and serving of data, while analytics focuses on questions, interpretation and decisions using it. The boundary depends on the team. Metrics definitions often need collaboration across both disciplines.
An analyst can identify the revenue metric needed by a team, while an engineer ensures it uses consistent invoice and refund data. Clarify who owns correctness, freshness and definitions when several teams consume the same dataset.
3. What are the basic stages of a data pipeline?
A pipeline typically ingests source data, validates and stores it, transforms it into suitable granularity, and serves consumers. Monitoring and recovery span those stages. Some systems combine steps, but the logical boundaries still matter.
An order feed can land raw events before applying validation and merging changes into a fact table. If the derived table breaks, replay from the retained input rather than asking the application to publish historical events again.
4. What is the difference between ETL and ELT?
ETL transforms records before loading them into the target; ELT loads data into a target and performs transformations there. Choose based on data sensitivity, compute location, storage constraints, cost and who needs raw data access.
A sensitive field may need redaction before loading into a widely accessible warehouse. Other input can land under restricted access and be transformed using warehouse compute. Many production architectures use both instead of requiring one universal pattern.
5. How does batch processing differ from stream processing?
Batch processing works on bounded input or scheduled intervals. Stream processing updates results as continuous or incrementally arriving inputs are processed. Streaming adds state, progress, ordering and recovery questions beyond simply using a shorter batch schedule.
Hourly inventory summaries may only need a batch. A detection workflow with a low-latency objective may require a stream. Compare acceptable delay, late-event behavior, operational cost and upstream readiness before choosing the more complex model.
6. What is a data warehouse?
A warehouse is a system designed to store and query data for analysis, often with support for managed compute, access controls and SQL. It differs from an online transaction system in workload and design rather than simply in how much data it contains.
A warehouse supports scanning years of revenue for a report. The checkout database must instead record individual updates reliably with low latency. Running both on one workload can create contention unless the architecture explicitly isolates them.
7. What is a data lake?
A data lake stores datasets such as files, often on object storage, for varied processing and analysis. The ability to store raw or semi-structured input does not by itself provide table transactions, governance or understandable data models.
One lake can retain event payloads and curated Parquet datasets. Establish discovery, permissions and lifecycle rules so teams know which outputs are authoritative. Otherwise the location can hold many copies with no trusted way to choose among them.
8. How does a lakehouse differ from a collection of data files?
A lakehouse pairs lake-style storage with table metadata and features intended for analytical workloads. Depending on the table format and implementation, it may support versioned snapshots, concurrent writes or schema evolution. A directory of files alone does not provide those contracts.
For example, a reader can use a committed table snapshot while another writer prepares new files. Confirm how the catalog and engines coordinate commits before assuming concurrency or rollback works. Features can differ between readers of the same table format.
9. What does OLTP versus OLAP mean?
OLTP handles high-volume individual transactions and updates, usually with tight correctness and latency requirements. OLAP is optimized for analysis over many rows, aggregates and history. These terms describe workload patterns, not a mandatory product boundary.
An application updating one customer's address is transactional. A report aggregating customer activity by month is analytical. Model serving and isolation around those requirements rather than assuming a table convenient for writes is also suitable for repeated large scans.
10. What is the grain of a table?
Grain specifies exactly what one row represents, such as one purchase order, one line item, or one customer on one calendar day. It determines keys, valid aggregates and joins. Define it before choosing dimensions and measures.
If amounts from line items are joined to order-level shipping charges, one shipping charge can appear multiple times. Declare both grains, inspect key multiplicity and aggregate to a common grain before computing totals that must reconcile.
SQL example (SQLite-compatible)
The original grain is one line. The output grain is one order, with totals 50 and 10.
11. What are facts and dimensions?
Facts describe business events or measurements at an explicit grain. Dimensions describe entities or attributes used to slice, group or contextualize those facts. Dimension history and fact grain should be chosen to match the reporting contract.
For sales, a fact can contain each order line and amount, while a product dimension supplies category. If category changes, decide whether history should reflect the past category or the current one. Both answers are useful but describe different metrics.
12. How does a star schema help analytical queries?
A star schema places a fact table at the center and joins it to dimensions that represent common analysis concepts. This makes query patterns and grain easier to see. It does not automatically prevent bad joins or replace integrity checks.
Analysts can filter sales by date, location and product through corresponding dimensions. A malformed dimension with duplicate keys will still multiply facts. Maintain uniqueness and define joins consistently rather than trusting the shape of the diagram.
13. Why use surrogate keys as well as natural keys?
A natural key comes from a source or business identifier; a surrogate key is generated for internal representation. Surrogate keys can stabilize warehouse joins across sources or distinguish dimension versions, but the mapping and business identity must still be managed.
A source customer ID may only be unique within one provider. Model provider and source ID together, and assign the appropriate warehouse identity or version key. Preserve source identifiers so merges and audits can be reconstructed.
14. What is the difference between a primary key and a foreign key?
A primary key identifies a row at its expected grain. A foreign key represents a relationship referencing another key. In analytical systems, key constraints may be informational rather than enforced, depending on the engine and table configuration.
Do not assume a customer dimension is unique just because a modeling document labels its customer ID a primary key. Add a uniqueness check and inspect joins for unmatched facts. Decide whether unknown keys are rejected, quarantined or assigned a tracked unknown category.
15. What is schema inference and where can it go wrong?
Schema inference derives types from data examples or source metadata. It can simplify exploration but is unsafe when data mixes shapes or the sample is unrepresentative. Production ingestion should handle contracts, incompatible versions and malformed data deliberately.
An ID field such as 00123 may become numeric and lose leading zeros if inference sees only digit strings. Define it as text and validate later. Test files with missing, malformed and newly added fields before accepting automatic inference as a production policy.
16. What is a data contract?
A data contract records expectations between a producer and consumers, including schema, grain, semantics, compatibility and potentially freshness. It is not just a schema file or a one-time agreement; it should have an owner and testable checks.
A producer can add an optional field without breaking many consumers, but changing the meaning of a timestamp may break a report even when the type is unchanged. Version such changes and test actual consuming logic before rollout.
17. When should you choose Parquet instead of CSV?
Parquet is a typed columnar format supporting efficient column selection and compatible filtering. CSV is a text interchange format with weak embedded typing and configurable parsing. Choose according to consumer needs, access patterns and the cost of enforcing a schema.
A large analytical table queried for a few columns generally benefits from Parquet. A small export to a legacy application might still need CSV. Specify encoding, delimiters, quoting, nulls and type conversion because those details are not reliably inferred.
18. What is the difference between JSON and newline-delimited JSON?
An ordinary JSON document can be one large object or array. Newline-delimited JSON writes one independent JSON value per line, making it convenient to process files incrementally. It still needs clear record schemas and rules for invalid lines.
For an event export, a reader can validate one line without holding the entire file. An unescaped newline in a record corrupts line boundaries; normal JSON encoding escapes string newlines. Test physical record layout and malformed inputs separately from syntactic validity.
19. What is the difference between partitioning and indexing?
Partitioning splits a dataset or table into logical parts that can sometimes be skipped. An index is a separate structure or access path used to locate data more selectively. Availability and behavior depend on the storage engine.
A lake table partitioned by date can avoid scanning other days if filters align. A transaction database may use an index for individual order lookups. Inspect actual plans and scans instead of assuming a filter is efficient just because some form of organization exists.
20. What is partition pruning?
Pruning skips partitions that cannot match a query's predicates. This reduces input scanning when data layout and filters align and the engine supports it. It does not eliminate the cost of reading selected partitions or address skew by itself.
A report filtering one month can skip unrelated date partitions. If dates are wrapped in an expression the planner cannot map to partition rules, more data may be scanned. Check scan statistics before and after a predicate rewrite.
21. Why do many small files hurt analytical pipelines?
Each file can add listing, metadata lookup, open and scheduling overhead. Large counts of tiny objects can reduce scan throughput even when the dataset size stays constant. Balance compact files against the ability to write and read in parallel.
An hourly streaming writer can gradually create thousands of small files per date. Track files and size distributions, then tune output or compact older partitions when safe. One huge file for a whole table may be a new bottleneck instead of a fix.
22. How does compression interact with storage format?
Compression reduces bytes but costs CPU and can interact with how files are split and how selected columns are read. Many analytical formats compress organized chunks or columns. Pick codecs and settings based on actual read and write workloads.
A cold archive may prioritize smaller objects. A hot dataset may favor faster decoding constrained by analyst latency. Benchmark representative scans; a codec with the highest compression ratio does not necessarily provide the lowest total compute or storage cost.
23. What is staging in a data pipeline?
Staging holds intermediate data before final publication so it can be validated, normalized or committed safely. It separates loading behavior from what consumers see. Define retention and cleanup for intermediate outputs instead of treating staging as long-term storage by default.
Write a replacement for one day to an isolated table, check counts and key coverage, then publish through a supported mechanism. If validation fails, production consumers keep the prior committed version. Verify that the underlying destination actually supports an atomic visibility boundary.
24. What is an incremental load?
An incremental load processes only new or changed data relative to a recorded baseline. Its correctness depends on a trustworthy change-selection mechanism, destination write semantics and recovery strategy. Appending everything received since a prior run is only one possible implementation.
A daily job can read source changes since a captured cursor and merge by business key. It must also account for deletes and changes with delayed timestamps. Test a repeat of the same interval and verify it does not duplicate or ignore updates.
25. What is a full refresh?
A full refresh recomputes an output from all relevant input rather than applying only new or changed rows. It can simplify correction and schema changes, but costs more resources and may require safe replacement semantics. It is not proof data is complete.
For a small lookup, rebuilding from an authoritative snapshot can be straightforward. For a very large fact table, full replacement can be expensive and risky. Compare a bounded backfill or affected partition rebuild where the transformation allows it.
26. What is change data capture?
Change data capture records source changes, often including inserts, updates and deletes, so downstream systems can process them incrementally. Log-based and timestamp-based designs have different guarantees. Capture order, identity and source availability affect correctness.
An update to a customer should not create a second current customer unless history is explicitly modeled. A delete needs a corresponding action or preserved marker downstream. Test behavior around initial snapshots, repeated messages and source schema changes.
27. What makes a data pipeline idempotent?
Processing the same logical input again should leave the intended durable output the same. This can use unique keys, transactional merges or deliberate partition replacement. Idempotency is a property of the operation and its observable effects, not merely of the scheduler.
Retrying an append after an uncertain result can double an invoice total. A supported upsert using stable event IDs can prevent duplication if update semantics also match the source. Verify idempotency by simulating failure between output and progress checkpoint.
28. What is backfilling, and when would you do it?
Backfilling processes prior intervals to repair gaps, apply corrected logic or populate new outputs. It needs explicit scope, replayable source input and coordination with ongoing production updates. It is not necessarily a full refresh.
If two dates were missed, isolate and rebuild only those dates where possible. Verify totals, duplicate behavior and unaffected intervals before promotion. Preserve the run’s input version so you can explain differences between original and reconstructed outputs.
29. What does pipeline orchestration do?
An orchestrator schedules or triggers units of work, manages dependencies and surfaces execution outcomes. It should not be mistaken for the datastore or transformation engine. A successful scheduler status is not sufficient evidence of data correctness.
A downstream dashboard model should wait for relevant inputs and validation, not just for every task’s nominal start time. Report data freshness separately and make retryable tasks safe to repeat. Clear dependencies are more reliable than assumptions about wall-clock order.
30. What does a DAG represent in data engineering?
A directed acyclic graph describes tasks and their dependencies without cycles. It says which tasks can run after others, not automatically how data is read or written. Some systems support dynamic tasks, but dependencies still need predictable semantics.
A pipeline may ingest orders and customers independently before joining them. If the order task succeeded with an empty partial source, the downstream graph alone will not catch it. Integrate quality gates and make required inputs explicit.
31. How do scheduled time and data interval differ?
A scheduled run may begin after the interval of source data it is meant to process. The run's wall-clock start time does not uniquely determine which records it owns. Use explicit intervals and document boundary inclusion rules.
A job starting shortly after midnight may own the previous day. If it retries two days later, it should still process that previous interval, not the current system date. Using an explicit start-inclusive, end-exclusive interval avoids overlap at adjacent boundaries.
32. What is the difference between event time and ingestion time?
Event time is when a source event logically occurred. Ingestion time is when it enters your system. Delays and replays mean those values often differ, so use the one that answers the measurement question.
A purchase made Sunday and ingested Monday belongs to Sunday revenue if the report uses event time. Ingestion time is still useful to measure freshness and investigate late arrivals. Store both when downstream decisions rely on the distinction.
33. What are late-arriving records?
They arrive after the time boundary or processing point originally associated with their event time. Late-data policy determines whether to revise results, route for later correction, or exclude under a documented rule. Do not equate late with invalid.
A device can send yesterday’s event after reconnecting. A daily report might recompute affected partitions, while an alerting system can reflect its lateness explicitly. Pick behavior based on consumer expectations, supported recovery and observed lateness.
34. How is freshness different from completeness?
Freshness asks whether data is current enough for its contract. Completeness asks whether the expected data has actually arrived and been represented. A table can update recently yet omit records, or be complete for an interval that is no longer current.
A file with a current modification time and only half the expected stores is fresh but incomplete. Track source control totals or expected partitions separately from last successful publish time. Do not infer either from scheduler success alone.
35. What is a basic data quality check suite?
A basic suite covers schema, required fields, uniqueness at the grain, valid values, referential expectations and counts or totals where meaningful. Checks need thresholds, ownership and an action such as warn or prevent publication.
Order IDs may need to be unique and amounts within a defined range. A missing optional campaign label may only warrant a trend metric. Tie each check to an actual risk so operators are not flooded by low-value warnings.
SQL example (SQLite-compatible)
The query returns order 1 with two occurrences. No result is expected when the uniqueness check passes.
36. What is data lineage?
Lineage describes where data came from and how it moved or changed through jobs, tables or columns. It helps trace defects, evaluate change impact and support audits. Its granularity and reliability depend on the information captured.
When revenue drops unexpectedly, lineage can identify a recent change to an upstream refund model. It does not by itself prove the change caused the drop. Correlate source snapshots, run versions and quality measurements before drawing a conclusion.
37. What is a data catalog used for?
A data catalog helps people discover datasets, understand definitions, find owners and see other metadata such as lineage, policies or sample schema. It should reflect actual maintained artifacts and responsibilities, not become a stale parallel inventory.
A consumer looking for customer counts should find the authoritative table, what one row means and whom to ask about a change. Connect metadata refresh to real deployments and distinguish a certified dataset from an unmaintained experimental output.
38. What is the difference between a null and a default value in analytics?
A null usually indicates missing or unknown information, while a default is a present value chosen by policy. Substituting a default can change filters, averages and business interpretation. State when replacement is allowed and report the rate of missing data.
Unknown discount is not necessarily a zero discount. An average can either exclude unknown values or apply a documented imputation, producing different answers. Use fixtures containing null and zero so those cases remain distinct through transformation.
39. How would you test a simple data transformation?
Construct a small source fixture with a documented grain, run the transformation and compare exact expected rows or agreed tolerances. Include one valid edge case and one invalid or missing case. Check output types and cardinality where they affect consumers.
For a daily total, include two sales, a refund and one amount that should be rejected. Assert both totals and rejection counts. A test that checks only the existence of an output table cannot detect double counting or data loss.
40. What is a useful beginner data engineer interview exercise?
Present two small source tables and a business question, then ask the candidate to define grain, join keys and expected output. Add null or duplicate cases and ask how they would test the result. Prefer reasoning over memorizing a tool-specific configuration.
Give orders and customers with an unmatched customer ID, then ask whether reports should retain the order and how to identify dimension defects. A strong answer separates assumptions from observed data and can predict row counts before writing SQL.
Data Engineer Interview Questions and Answers for Intermediate
Strong answers should identify edge cases, measurable guarantees and checks after a change.
41. How do you detect join fan-out in a fact pipeline?
Verify key uniqueness on the intended one-side and compare output counts and measures at fact grain. Check for many-to-many keys, overlapping effective dates and missing-key rules. A correct join syntax does not establish the intended relationship.
For sales enriched with customer history, count matches per fact before projecting the final table. If some facts match multiple rows, inspect overlapping validity ranges. Fix the grain or source contract rather than applying distinct to a result that may already have inflated totals.
SQL example (SQLite-compatible)
One fact has two matches. Count a known non-null dimension key so an unmatched left row is not counted as a match.
42. When would you use a left anti join in data validation?
A left anti join returns left-side rows without matching right-side records under the specified predicate. It is useful for identifying broken references or gaps without duplicating matches. Evaluate null semantics and choose whether missing keys are a separate problem.
Find order records whose product ID is absent from the active lookup. Policies could quarantine them, preserve them with an unknown dimension key or retry after late data arrives. Report the subset and trend before deciding which failure response is appropriate.
43. How would you deduplicate an event feed deterministically?
Use a stable event ID and a consistent winner definition when records conflict. Order by source sequence or documented precedence with enough tie-breakers to produce a single winner. Keep contradictory equal-version payloads visible rather than masking them by arbitrary selection.
An event arriving last is not necessarily the newest business version. If a replay delivers an old event later, ingestion-based ordering can overwrite newer data. Assert event cardinality and verify that repeating the same feed yields the same final state.
SQL example (SQLite-compatible)
This fixture has one record per event and version. In production, equal-version conflicts need a stable rule or a quarantine step.
44. What are Type 1 and Type 2 slowly changing dimensions?
Type 1 overwrites attributes when they change; Type 2 stores versions with effective intervals or a comparable current marker and identity. The decision depends on whether historical reports should preserve the value as it was at event time.
Use Type 1 for a typo correction if old spelling has no analytical value. Use Type 2 when historical region affects sales reporting. Test exactly one valid match per applicable fact and exercise corrections that alter previously loaded intervals.
45. How would you build an effective-dated dimension join?
Join on the business key and a timestamp within one nonoverlapping validity range, typically start-inclusive and end-exclusive. Choose a convention for open-ended intervals and normalize timestamp types and zones. Reject or handle rows outside known history explicitly.
A purchase at midnight on the start of a new version should match the new one only. Test records at both boundaries and check for dimension intervals that overlap or have gaps. A simple equality join on customer ID is insufficient when versions are retained.
SQL example (SQLite-compatible)
The result is new because intervals are half-open. The fixture uses comparable ISO date strings; choose appropriate typed columns and zones for production.
46. When is a snapshot fact preferable to an event fact?
Use a snapshot fact to represent state at a defined point or period, such as daily inventory per SKU. Use event facts to represent individual changes or transactions. Snapshots are easier for some point-in-time questions but may lose within-period detail.
End-of-day balances can be modeled as daily snapshots. Summing those balances across days does not usually give transactions or cumulative holdings. Define which dimensions support aggregation and preserve event data if reconstructing intra-day changes matters.
47. Why distinguish additive and non-additive measures?
A measure may be safe to sum across all dimensions, only some dimensions, or none. Ratios and many snapshots need recomputation or specialized aggregation. A metric definition should list the permitted aggregation behavior.
Warehouse counts by facility may be summed across facilities for one date, but summing end-of-day inventory across dates is often meaningless. For conversion rate, sum numerator and denominator before dividing instead of averaging subgroup rates with unequal denominators.
48. How would you model a many-to-many relationship in analytics?
Consider a bridge table with a declared grain and explicit allocation policy when totals must remain additive. Some queries can use existence semantics instead of expanding facts. The model must document what counts as participation versus attributed contribution.
If a sale is credited to two campaigns, report either distinct sales or split credit according to a rule. A raw join can make revenue double silently. Write tests with zero, one and multiple links and verify allocations sum to the intended amount.
49. How do you choose between append, upsert and replace-by-partition?
Use append for new immutable events with deduplication where needed, upsert for mutable keyed state and scoped replacement for recomputed intervals. Check sink capabilities, atomicity and concurrency. The same business dataset may use different write modes at different layers.
Raw change events can append, while a current customer model merges by entity ID. A recomputed daily aggregate may replace one day; test that the selected operation cannot overwrite unrelated dates. Verify retry behavior for each independently.
50. How do you choose a cursor for incremental extraction?
Use an ordered stable change position when available, ideally one that represents source commit progress. Timestamps can tie, drift or arrive late, so a compound cursor or bounded overlapping window may be required. Record cursor advancement only after the agreed processing boundary.
Two records can share the same updated timestamp, making a strict greater-than filter miss one after a page boundary. Add a stable tie-breaker or explicitly re-read overlap and deduplicate. Test that a retry after uncertain write does not skip records.
51. What is the difference between a source offset and an event ID?
An offset tracks progress within a source coordinate system such as a partition, while an event ID identifies a logical event for business deduplication. One event may appear at multiple source positions, and the same offset value can occur in different partitions.
A Kafka consumer should scope offsets to partition and topic, while a destination deduplicates repeated business events using a stable event key. Replaying from an older offset should not cause the application to treat all re-read data as new.
52. How do you avoid missing changes during an initial CDC snapshot?
Use a connector strategy that ties the snapshot to a source log position and captures changes around the snapshot boundary. Verify consistent snapshot scope and streaming catch-up. Do not assume a standalone table copy followed by current log reads has no gap.
A record can update after its snapshot read but before the connector starts consuming unless recovery uses a correct coordinated position. Test inserts, updates and deletes during the snapshot period. Compare source and destination after the stream catches up.
53. How should delete events be represented downstream?
Preserve the deletion signal and original entity identity, then apply the consumer policy: hard-delete, mark deleted or retain authorized history. Connectors and compacted logs can treat tombstones differently. Explicitly distinguish user deletion semantics from operational transport markers.
A delete may remove a customer from a current-state table while a restricted audit table retains a permitted record of the change. Confirm propagation across aggregates and copies. Verify that replay or an old update cannot incorrectly resurrect deleted state.
54. What do at-least-once and exactly-once mean for data pipelines?
At-least-once permits retries that repeat delivery; exactly-once requires equivalent single observable effects within a defined scope. Guarantees depend on source, checkpoint, transformation and sink. One component's transaction setting cannot guarantee all external results automatically.
A consumer may re-read records after writing to a database and before acknowledging progress. A merge keyed by event ID can make the database effect replay safe, but a separate external call still needs its own idempotency contract. Test that failure window directly.
55. How do you reason about ordering guarantees in a partitioned event log?
Ordering is normally scoped to a partition, not globally across all events. Key choice affects which related messages share an order and how load distributes. Downstream consumers may still need version comparisons and handling for data produced out of business-time order.
Partition related customer changes together if the producer contract requires sequence for that customer. A single hot customer may then constrain throughput; design for it intentionally. Avoid comparing offsets across partitions to decide which event occurred first.
56. What is a watermark and why does it matter for state?
A watermark estimates event-time progress and can define what state is safe to release or when results may be finalized under the engine's semantics. It is not the scheduler clock or a universal guarantee about every late event.
Set a delay based on measured arrival patterns and correction tolerance. For a payment aggregation or other sensitive measure, retaining an offline correction path can matter more than choosing an arbitrarily large online delay. Verify behavior when upstream pauses or clocks diverge.
57. How do tumbling and sliding time windows differ?
Tumbling windows are adjacent and nonoverlapping for a chosen boundary, while sliding windows overlap when their slide is shorter than their length. A single event can appear in several sliding results. Choose event-time or processing-time semantics intentionally.
A per-hour unique-user trend and a rolling sixty-minute monitor serve different questions. Never sum overlapping windows as if they were disjoint periods. Test what happens at exact left and right boundaries and whether timestamps share a consistent zone.
58. How would you handle a batch whose source data is partial?
Detect the shortfall using expected partitions, control totals or a source readiness contract. Decide whether to block production, publish clearly marked partial data or defer selected regions. Preserve prior complete data if the contract requires it.
If five of six daily store exports arrive, a scheduler success based on file presence can still produce a wrong total. Identify the missing source, record completeness and alert the owner. Do not replace known good data with partial results by default.
59. How do you test a backfill without risking live data?
Rehearse on an isolated destination with explicit interval bounds, the intended source snapshot and the same transformations. Reconcile counts, measures, permissions and duplicate behavior. Verify the production publication mechanism separately and control overlap with normal jobs.
A backfill for one week should not touch later partitions. Test intervals and conflict handling on a disposable target. Document rollback scope and compare held-out unaffected partitions before promoting output, not only records you intended to fix.
60. How can orchestration retries cause incorrect data?
A task may have already completed part or all of its write even if its final status failed. Retrying non-idempotent tasks can repeat rows or events. Task logic should use explicit intervals, durable commit markers or another recovery contract appropriate to the sink.
For a failed nightly append, do not assume the destination is empty. Inspect its operation metadata and choose a replay-safe merge or deterministic replacement. Test an intentionally interrupted attempt after the first useful output is written.
61. What should determine task boundaries in an orchestration workflow?
Choose boundaries by ownership, resource profile, visible outputs and recoverability. Put durable checkpoints between operations when independent retry is valuable. Avoid both very large opaque tasks and unnecessarily tiny tasks that increase overhead without useful isolation.
Separate source capture from transformation if replay should not reread a fragile upstream. Combine cheap related validations when there is no benefit to separate execution. Make clear which data product each task emits and what downstream may take as a trusted prerequisite.
62. When should a scheduler wait for source data rather than run only by clock?
Use data readiness signals when arrival is variable and consumers need a complete input. Time schedules can still provide escalation or timeout policies. A completion signal should correspond to a meaningful source version and expected scope.
For a daily file feed, check a manifest or success marker for the intended interval rather than starting as soon as one file appears. If the agreed time passes with no usable marker, report lateness instead of treating empty input as a success.
63. What causes small files during writes, and how can you reduce them?
Frequent incremental commits, highly granular storage partitions and many writing tasks can produce small files. Adjust output distribution or write cadence and compact selectively using a mechanism compatible with the target. File count is a workload-specific metric, not a fixed one-to-one task result.
For a daily table updated every minute, measure the number and sizes of both active and historical files. Balance downstream scan cost against freshness. Avoid merging the entire dataset into one output task solely to minimize the number of files.
64. How do you choose partition keys for a curated analytical table?
Start with actual filters, expected cardinality, data per partition and ease of lifecycle operations. A good partition key reduces scans without generating too many tiny partitions. Test representative traffic rather than choosing every popular filter as a partition field.
Date can work well for retention and bounded reads. Combining date with a near-unique user ID likely creates excessive metadata. If queries mostly target recent days or customer subsets, compare layout and supported clustering strategies using actual query metrics.
65. How do column pruning and predicate pushdown differ?
Column pruning reduces the fields read, while pushdown lets a data source apply filters closer to the scan when supported. Partition pruning can also skip parts of the dataset before reading records. Inspect execution plans and source metrics to distinguish these effects.
A Parquet scan selecting two fields can benefit even when a filter cannot be pushed into the reader. A predicate rewrite may lower scanned data but must preserve null and time-zone semantics. Compare query results and bytes read before claiming improvement.
66. When is the shuffle an important data engineering bottleneck?
Shuffles redistribute data for joins, grouping or ordering and can consume network, disk and memory. They are important when large exchanges, spills or skew dominate measured execution. Do not optimize solely to avoid every exchange; some are required by the computation.
Project unused fields and filter earlier if that preserves semantics, then measure the actual data moved. If one hot key dominates a join, adjusting all partitions may not help. Inspect per-task distributions and test the known skew case.
67. How do you choose a conflict policy for an incremental upsert?
Define stable keys, source ordering, tie rules and which fields can be updated. Resolve input duplicates before merging where the sink requires it. Preserve source precedence and handle deletes as deliberate transitions rather than generic updates.
A delayed old version should not overwrite a newer customer state. Compare commit or sequence values in the merge and quarantine equal-version conflicting payloads. Test replaying historical changes in a different arrival order to verify determinism.
68. What makes a warehouse transformation reproducible?
Record input versions or intervals, code version, relevant parameters and policies, and commit outputs using stable schemas. Reproducibility depends on what upstream snapshots can still be retrieved. Running the same SQL at different times may not give the same answer.
If a query uses the current clock as an eligibility boundary, pass the intended as-of timestamp for historical execution. Record reference-table versions and time zones. Compare results from two equivalent executions before relying on reproducibility for audits.
69. Why can schema evolution be compatible syntactically but still break consumers?
Types and required fields capture only part of the contract. Renames, changes to meaning, units, allowed values or grain can break computations even if a query still parses. Define compatibility by downstream interpretation and test the relevant use cases.
A quantity field remaining an integer may shift from cents to dollars, drastically changing a metric while passing schema checks. Coordinate a new field or version, run both if needed and validate consumer calculations before switching producers.
70. How would you quarantine bad records without hiding failures?
Send invalid records or safe diagnostic samples to a restricted path with classified reasons, provenance and handling policy. Keep counters on the main pipeline and decide which violations block release. Quarantine is observable treatment, not an excuse to ignore trends.
If hundreds of records suddenly fail one conversion, warn or block according to business impact. Store a replay route and test that fixing a record does not duplicate an earlier partial representation. Redact or restrict access to raw sensitive payloads.
71. How would you reconcile source and destination records after migration?
Align scope, grain, types and time filters, then compare counts, distinct keys, exact or tolerance-aware totals and match multiplicities. Inspect samples of differences after distributed comparisons. No single row-count comparison establishes equivalence.
Two tables can have equal counts while missing one ID and duplicating another. Use key-based anti joins and compare measures at an important grain such as account-day. Establish allowed differences before using a reconciliation run as a migration gate.
72. How do you validate delete and update handling in CDC tests?
Use fixtures with insert, repeated delivery, ordered updates, old replays and deletes. Check both the current-state result and any retained history. A fixture created only by bulk inserts cannot establish change capture correctness.
Exercise a crash or retry after the sink commits but before progress advances. The repeated event should not change the final state, and a replayed old update should not undo a newer delete if the contract forbids resurrection. Verify ordering and identifiers.
73. What should an observable data pipeline record at each run?
Track unique run ID, code and input versions or intervals, counts, durations, failures, output snapshots and ownership. Capture metrics for arrival, processing and publish separately. Avoid logging full records or fields that are not needed for diagnosis.
For a late report, metrics should show whether upstream was delayed, validation stopped publishing or downstream refresh failed. Use bounded metric labels and safe identifiers. Test an intentional failure to confirm that stakeholders can tell which boundary to inspect.
74. How do a freshness objective and an availability objective differ?
Freshness defines how current the served data should be, while availability can describe whether consumers can access an acceptable dataset or service. Define both from the consumer’s perspective. An available query interface can still return stale or incomplete data.
A dashboard might serve the last known good data while new inputs are late. Show its last complete interval and measure the freshness miss separately from query uptime. Tell consumers which decisions can still use older data and which cannot.
75. How would you secure a data pipeline without stopping useful access?
Use least-privilege identities, separate raw and curated access, encrypt as required and log access to sensitive areas. Minimize unnecessary copies and expose approved views or aggregates. Define consistent lifecycle rules across storage, logs and derived outputs.
An analyst may need aggregate customer trends without seeing raw identifiers. Grant access to a curated view under appropriate policy rather than copying a raw table into a broad workspace. Test permissions with an intended role and a role that should be denied.
76. What factors matter when choosing a warehouse versus a lake table?
Compare workloads, integration requirements, governance, cost and operational ownership. Warehouses often provide integrated query and administration features; lake tables can serve storage-oriented interoperability and multi-engine use. Product capabilities matter more than categorical labels.
If most users query managed SQL and depend on consistent performance, integration may outweigh open-format requirements. If data is read from several engines, test semantics and feature compatibility across them. Make migration, lineage and concurrency assumptions explicit before selecting a platform.
77. How do you choose between a daily rebuild and incremental merge?
Compare source size, change rate, latency needs, correction behavior, write guarantees and operational complexity. A full rebuild can be clearer and safer for small data; incremental work can reduce cost at scale but requires more recovery and consistency design.
A small type mapping may rebuild quickly and eliminate deletion edge cases. A massive fact table cannot afford frequent full recompute, so append or merge changes and retain a bounded repair route. Measure cost under normal runs and realistic backfills.
78. What is the difference between data validation and data reconciliation?
Validation checks whether a dataset meets its own rules, while reconciliation compares it with another trusted view or source for agreed equivalence. Each can pass while the other fails. Choose the right gate for the decision being made.
A table may contain only valid, unique positive transactions while missing an entire input partition. It can pass record validation but fail source reconciliation. Test totals, keys and delivery manifests to catch missing data that valid-row checks cannot see.
79. How do you design a reliable file ingestion manifest?
Record expected object identities, input window, counts or integrity data and completion status from a trusted producer. Process only the defined set and make retries aware of content identity or version. Separate file discovery from determining that an interval is ready.
A feed split by region can include one object per required region and a final manifest. A late amendment should create a new version or explicit correction rather than changing a file invisibly. Verify duplicates, missing files and changed content at an existing name.
80. How should you document a dataset for downstream users?
State grain, identifiers, freshness and completeness guarantees, approved uses, data classification, ownership, and known limitations. Explain important calculations and reference definitions, not just column names. Keep documentation linked to versioned ownership and validation artifacts.
For customer activity, specify whether test accounts are excluded, when late changes are reflected, and what one row represents. Provide sample queries at the correct grain. Communication prevents subtle report inconsistencies that may never appear as pipeline errors.
Data Engineer Interview Questions and Answers for Experienced
Look for defensible assumptions and a plan to prove correctness, recoverability and cost.
81. How would you design an order pipeline from creation through warehouse reporting?
Start with business identities, source change contract, expected freshness and output grain. Capture replayable changes, normalize schema, apply idempotent writes and gate publication with reconciliation. Make access, ownership and recovery explicit before selecting tools.
An order line can be corrected or refunded after the first publication. Model the effect independently from arrival order, and reconcile totals and keys by affected day. Separate transaction capture, analytical modeling and operational recovery in the design diagram.
82. How do you design a pipeline for a tenfold traffic increase?
Measure actual limiting stages first: input, shuffle, sink, orchestration or external quotas. Define peak shape, recovery requirements and capacity bounds. Partition and scale bottlenecks according to work distribution rather than just buying larger workers.
A tenfold increase in events and no increase in distinct accounts can concentrate work on existing hot keys. Test spikes and sustained traffic independently. Include catch-up throughput so a system that handles steady arrivals still has capacity to recover from outages.
83. How do you recover data after a source outage longer than log retention?
Establish the last verified source position and what retained history is available. If the log has a gap, obtain an authorized snapshot or archive and reconstruct affected state with explicit limitations. Reconcile and document gaps rather than silently resetting to the latest offset.
A fresh snapshot may restore current state but cannot recreate deletions or historical transitions absent from independent records. Tell consumers which outputs cannot be recovered exactly. Resume change capture from a trustworthy boundary only after validating the baseline.
84. How would you repair a corrupt pipeline output while new data keeps arriving?
Isolate the affected outputs and source versions, protect last known good data, and decide how fresh writes coordinate with recovery. Rebuild independently where possible and commit through a supported transaction or controlled cutover. Test both old and new arrival paths.
For corrupt daily aggregates, rebuild the damaged days while leaving current-day writes separate. If late updates target the same partition, use a conflict-aware commit or brief supported fence. Verify untouched partitions and rollback behavior before releasing repaired results.
85. How do you prove a backfill did not break an unaffected interval?
Establish a pre-backfill snapshot or equivalent baseline, assert the exact write scope and reconcile untouched data after commit. Use manifest, snapshot metadata or comparison by keys and aggregates where appropriate. Validate permissions and storage semantics before relying on a dry run.
A job replacing a week may accidentally overwrite all dates because the target mode is too broad. Check the write plan and compare old and new outputs beyond the intended range. Maintain a restore option in case downstream systems observe a bad commit.
86. How would you redesign a pipeline that takes longer to run than its scheduling interval?
Separate queue delay from execution time and identify the stage whose sustained throughput is insufficient. Avoid piling retries and overlapping work onto the same bottleneck. Tune or redesign the limiting component and consider a new interval or incremental architecture if business goals allow.
If daily processing takes twenty-six hours, starting another run each day increases backlog unless capacity changes. Try processing independent ranges safely or reducing repetitive scans. Measure catch-up speed and end-to-end freshness rather than only optimizing the longest task.
87. How do you design idempotency across multiple systems with different transaction guarantees?
Define the unit of effect and record durable intent or progress at a boundary that can be observed. Use supported transactions where possible, stable operation identities and replay-safe writes elsewhere. Do not claim an atomic multi-system operation without appropriate coordination.
If a warehouse commit succeeds but an event announcement fails, preserve the intent to announce and allow replay without repeating the warehouse effect. Reconcile by stable operation ID. Test interruption between each side effect to discover which external states are actually possible.
88. How would you choose between an outbox and direct dual writes?
An outbox can record a business update and a pending event together in one database transaction, then relay the event later. Direct writes to independent systems have an inconsistency window unless a stronger protocol exists. The relay still needs retries and duplicate handling.
For an order change, a crash after database commit but before publication must not erase the event. A relay can resume from durable intent. If it publishes twice before marking one record done, consumers should treat the same event ID as a replay.
89. How do you keep a CDC sink consistent when events arrive out of order?
Define ordering per entity or other source scope and compare a trustworthy version at write time. Preserve deletes and handle repeated or contradictory versions deliberately. Where a total source order is unavailable, document which conflicts need human or upstream resolution.
A newer delete followed by an older update should not recreate the row. Store enough version information to reject stale changes or retain a suitable tombstone. Test equal-version duplicates and conflicting payloads rather than only monotonic delivery.
90. How would you evolve a streaming schema without breaking live consumers?
Classify compatibility for producer, transport, readers, stored state and destination. Plan dual-read or dual-write migration where necessary, with an explicit cutover and fallback. Validate historical replay as well as new events because old versions can arrive later.
Adding an optional field may be compatible for one consumer but not a strict schema enforcement layer. Test mixed versions, null handling and the old checkpoint where applicable. If a semantic meaning changes, prefer explicit new fields or versions over reinterpretation.
91. How would you change the key used to partition a live event topic?
Treat it as a change to ordering and distribution semantics. Plan separate destinations or controlled cutover, verify how related events move and where old and new order guarantees end. Capture a progress boundary and design replay and deduplication explicitly.
Switching from account key to region key can reorder per-account updates if accounts span routing changes. Test migration while events are actively arriving. Avoid promising a global order when the source only defines partition-local order.
92. How do you diagnose a large lag increase in a streaming pipeline?
Compare source production rate, consumer throughput, input partition balance, processing durations, sink latency and checkpoint timing. Identify whether backlog is increasing or simply visible at a new boundary. A single aggregate lag number does not tell you which component is slow.
One partition with a hot key can lag even while other partitions are current. Inspect partition-specific age and compare sink waits with transformation time. If an external sink is capped, adding consumers can increase contention rather than throughput.
93. How do you design overload behavior for a streaming ingestion service?
Define durable buffer capacity, admission, quotas and downstream retry limits. Prioritize critical data by an explicit policy and observe both age and volume. Normal bursts and sustained overload need different responses; measure how long until retention limits threaten recovery.
For recoverable feeds, slow reads so source replay holds pending data while capacity is restored. For nonreplayable sources, use durable admission before acknowledging or clearly reject. Test recovery speed, fairness and resource use when one producer overwhelms others.
94. How would you handle increasing state size in event-time processing?
Inspect state keys, window bounds, watermark progression and per-input arrival patterns. Some retention is required for correct late-event behavior. Rework state or layout before shortening the lateness window without understanding what valid results would change.
An idle source can hold back event-time progress, making state linger despite stable volume. Inspect operator metrics and test input behavior separately. If the business needs longer revisions than live state can afford, add an explicit correction path with reconciliation.
95. What does an end-to-end exactly-once claim need to specify?
Specify which logical effect is exactly once, under which failures, and through which source, state and sink boundary. Distinguish equivalent output from the number of execution attempts. External notifications, multiple sinks and irreversible actions may have independent guarantees.
A query can replay a micro-batch without creating duplicates in an idempotent table while still repeating an external webhook. Test the commit/acknowledgment failure window. Describe atomicity at a more limited boundary if end-to-end guarantees cannot actually be provided.
96. How do you choose a strategy for late facts in a dimensionally modeled warehouse?
Decide whether consumers need historical truth as of event time, what corrections must propagate and when facts may be temporarily unmatched. Use event-time joins, inferred or unknown members, or affected interval rebuilds according to policy. Preserve the original source event.
A sales fact can arrive before its customer dimension update. An unknown-row assignment can maintain counts but require later reconciliation. Track unmatched age and explicitly repair affected dimensions without overwriting a correct historical classification accidentally.
97. How do you repair wrong Type 2 dimension history?
Identify affected natural keys and validity intervals, reconstruct from trustworthy history and test nonoverlap and gaps. Determine which dependent facts or materializations must be rebuilt. Keep correction identity and lineage so historical changes are explainable.
If a region assignment took effect one day earlier than recorded, existing fact-to-version keys can be wrong. Recompute the affected join scope and reconcile totals. A dimension-only fix may leave previously materialized facts pointing at the original version.
98. How would you handle reconciliation discrepancies with equal global totals?
Compare data at the intended grain and inspect multiplicity, key coverage and per-dimension splits. Equal sums can mask offsetting errors. Bound the difference investigation through diagnostic counts and affected partitions rather than copying every record to a local environment.
One customer can be overcounted by the amount another is undercounted. Partition checks by account and date, then inspect a few safe examples. Check differences across multiple dimensions before calling migration results equivalent.
SQL example (SQLite-compatible)
The grand totals both equal 50, but the query finds two discrepancies. For migration validation, also use anti joins or equivalent comparisons to identify keys missing on either side.
99. How do you design end-to-end lineage for reproducibility?
Capture source and sink versions, run identity, code revision, approved parameters and relationships across jobs. Connect these records to catalog ownership. Choose precision based on the decisions lineage must support, such as proving which source release caused an output change.
Column lineage may help identify users affected by a type change, while input snapshot lineage explains why a rerun differs. Record evidence from execution, not only static workflow diagrams. Validate that an incident can be traced backwards using the stored metadata.
100. How would you choose a data quality SLO for a high-impact table?
Identify consumer decisions, define measurable quality and freshness thresholds, choose monitoring intervals and decide what happens when a bound is breached. Separate essential guards from warning-level conditions. Use historical behavior and business tolerances rather than inventing a universal accuracy number.
A finance table may need exact reconciliation before release, while a trend dashboard can tolerate a short lag. Document the time scope and population of each measure. Test that a simulated defect notifies responsible owners with enough evidence to triage.
101. When should a data quality issue block publication instead of alerting only?
Block when the defect violates a critical contract and serving stale verified data is safer than serving bad data. Alert for lower-risk variation, degradation under documented policy or issues that cannot be judged at publish time. Define substitutes and ownership ahead of incidents.
Nonunique invoice keys can invalidate a total and should block the fresh batch under many contracts. A moderate increase in a nonessential optional field's null rate may only need investigation. Make the last known good state and missing interval visible to consumers when a gate blocks.
102. How do you make alerts for data freshness actionable?
Time the signal from the consumer’s promised complete interval. Expose which upstream arrival, transformation, quality check or publication step is late; identify urgency, ownership and relevant run information. Avoid firing alerts every time normal data arrives within its documented window.
If reports need a full dataset by eight, alert when the needed input or expected refresh is in jeopardy, not merely when one scheduler task starts late. Include last complete interval and estimated catch-up based on observed throughput, without guessing recovery time.
103. How would you investigate a sudden warehouse cost increase?
Break spend down by workload, query identity, storage, compute and workload timing. Compare scans, shuffles, concurrency and retries before changing capacity. Determine whether the costs arise from more use, a regression or changed billing treatment.
A missing date predicate may increase bytes scanned even while job frequency is stable. Confirm the same inputs, then apply a semantically equivalent filter or layout change. Measure ongoing cost and latency rather than reporting expected savings as verified savings.
104. How would you optimize a data workflow constrained by hot keys?
Locate skew with per-key distributions and task metrics, then identify allowable splits or alternate algorithms. Distinguish a giant true many-to-many output from unbalanced execution. Consider preaggregation, adaptive execution or targeted key handling without changing business results.
If a placeholder ID causes most facts to share one group, classify or handle it separately where policy permits. For genuine hot entities, split work with an explicit recombination contract. Test exact output multiplicity as well as the reduction in slow tasks.
105. How would you select a file compaction strategy for a table with continuous writes?
Measure workload, file-size distributions and read effects, then choose a target scope and concurrency-safe rewrite strategy. Maintain snapshot, commit and conflict semantics with the table's catalog. Avoid deleting files still required by current snapshots or recovery processes.
Compacting older partitions may deliver most scan benefit with few conflicts. Rewriting an active partition can miss files appended after the read unless the table protocol detects or reconciles the conflict. Verify reader visibility during the operation.
106. How would you roll out a table format migration to multiple engines?
Inventory features each reader and writer depends on, define a compatibility matrix and shadow a representative dataset with isolated outputs. Test schema changes, deletes, snapshots and concurrency. Preserve lineage and choose a reversible visibility cutover.
Two engines may claim format support yet differ in write features or interpretation of field history. Run representative queries, reconciliation and recovery tests across engines. Plan how consumption returns to the old table without exposing conflicting partial data.
107. Why can restoring an old table snapshot be operationally risky?
Restoring table data may not roll back downstream exports, cache materializations or external side effects. It can also conflict with subsequent writes. Define which artifacts are in scope, verify catalog and retention behavior, and coordinate with owners of dependent outputs.
If an incorrect daily report was already copied to another system, reverting the warehouse snapshot leaves the other copy unchanged. Use lineage to identify what must be rebuilt or corrected. Preserve evidence of both the error and the restored version.
108. How do you design disaster recovery for an analytical pipeline?
Set recovery time and recovery point objectives from business requirements, then verify backup, capture, replication and replay mechanisms by component. Protect metadata and catalogs as well as data files. Practice restoration and consumer cutover in isolation.
A file backup may be inadequate if schema history and source offsets are missing. Test restoring a known time interval and identify which events would be lost under a real outage. Measure recovery speed and verify final data quality instead of assuming backup presence means recovery readiness.
109. How would you minimize sensitive data in a new analytical dataset?
Start from approved use and include only fields necessary for it. Apply appropriate redaction, aggregation, role-based access and retention, and protect intermediate outputs and diagnostics. Define whether linkage across datasets is permissible before choosing join identifiers.
A cohort report might need only counts by broad group rather than raw personal records. If convenient input contains extra attributes, remove them before creating broad-access copies. Test permission paths and review whether downstream users could reconstruct data from small cells or combinations.
110. How would you design a deletion process across derived tables and backups?
Map lineage and responsibilities, apply the authorized retention or deletion policy across relevant systems, and treat backups, event logs and derived outputs according to their supported lifecycle. Verify completion, exclusions and audit evidence. Avoid inferring legal requirements solely from engineering practice.
A deleted user may still appear in cached extracts or replayable sources. Verify propagation and ensure a later backfill cannot improperly resurrect data. Use approved rules from the relevant data owner and test the protocol without exposing real user records.
111. How do you migrate a pipeline from batch to streaming without changing the business metric?
Keep the semantic definition and grain explicit, then reconcile streaming state, event-time windows, late corrections and historical batch output. Run in shadow on comparable input, test replay and choose a cutover that preserves coverage and duplicates. Account for provisional versus final results.
A streamed daily count can update earlier than the batch but needs rules for revisions and incomplete days. Compare finalized periods and intentionally late fixtures. Notify consumers if the new interface serves provisional data earlier than before.
112. How would you implement blue-green deployment for a data pipeline?
Run old and new versions against well-defined comparable inputs, publish the new version to an isolated target, validate output and move consumers through a controlled pointer or view when ready. Keep rollback and external effects explicit. Avoid having both versions write unsafely to one target.
For a revised sales model, compare several full periods and a backfill in parallel. If the cutover fails, revert the consumer pointer only if compatible data continues to exist and downstream caches can recover. Document start and finish times for handover diagnosis.
113. How would you choose between a big redesign and incremental repair after incidents?
Evaluate incident frequency, user harm, current bottlenecks, repair cost and the ability to verify a redesign. Fix immediate defects and create measurements that expose recurring failure modes. Redesign when the core contracts cannot be achieved economically with incremental work.
A single missing uniqueness check may need a small repair, while repeated unrecoverable partial outputs point to an unsafe publication model. Set criteria to compare approaches, including rollback and operational ownership, rather than assuming novelty makes a system more reliable.
114. How do you test migration performance without distorting production workloads?
Use realistic data shapes, skew, concurrency, file sizes and resource limits in an isolated or approved canary setting. Separate setup, scans, shuffle, sink and scheduling measurements. Compare equal work and identical result semantics before attributing improvement to a new engine.
A test that only benchmarks a small uniform sample can miss one large customer forcing spill in production. Compare median and tail runtimes across several realistic intervals and include failure retries. Record cost, resource allocation and data parity with timing results.
115. What should a data-engineering incident runbook contain?
It should identify owners, critical signals, expected data windows, safe diagnostic steps, recovery options and decision points. Include how to assess consumer impact, verify partial commits, protect last known good data and test repaired results before resuming normal publication.
For a missed partition, provide ways to confirm whether input was missing or processing failed, avoid unsafe duplicate retries and validate a targeted backfill. Include escalation and communication paths that have been exercised rather than relying on a document no one has tested.
116. How would you reduce pipeline cost without missing freshness objectives?
Measure workload by stage and consider processing only affected data, pruning inputs, improving writes, or choosing capacity that matches required performance. Compare cost per successful complete output rather than cost per unit time alone. Maintain capacity for repair and unusual arrival patterns.
A slower cheaper job that misses its release window or constantly retries can cost more overall. Try an incremental model on representative snapshots and confirm corrections still converge. Measure ordinary run, surge and backfill cost separately.
117. How do you define ownership for a shared data platform?
Distinguish owners of source contracts, shared infrastructure, specific pipelines and consumer definitions. Establish support, change management and incident responsibilities. Document who can decide that a dataset is ready, degraded or withheld and link that decision to observable evidence.
A platform team can own compute availability while a domain team owns revenue definition and quality expectations. Without this split, an uptime dashboard might say all is healthy while business metrics are wrong. Practice coordination when a change spans ownership boundaries.
118. How would you balance self-service analytics with consistent definitions?
Provide documented curated products and governed reusable models, while allowing clearly labeled exploration. Distinguish official metrics from derived experimental analyses. Create a process for validating changes and deprecating copies rather than prohibiting reasoning outside a central report.
If finance and growth need distinct revenue measures, publish both with precise names and scope. Reuse stable facts where possible. A shared query library does not ensure consistency if users cannot find it or do not know which definition answers their question.
119. What would you ask before selecting tools in a data engineer system design interview?
Clarify source and destination contracts, volume and skew, latency and completeness objectives, replay and retention, privacy and operational ownership. Propose a simple design first and state where stronger guarantees need product-specific support. Explain failure behavior before picking brands.
For a system handling payments and late refunds, ask whether consumers need finalized daily figures or immediate preliminary values. That changes event windows, corrections and quality gates. Compare a simple batch baseline with streaming only where business needs justify it.
120. How would you demonstrate that a pipeline is ready for production?
Demonstrate correctness at the intended grain, replay safety, capacity, security boundaries, observable failures and recoverability. Document scope, assumptions and ownership. Use representative production-like tests and explicit evidence rather than judging from one green scheduled run.
Show a partial source arrival, interrupted publish, repeated event and targeted backfill with reconciliation. Verify consumers either see correct new data or a documented last known good state. Point to alerts and runbooks explaining what happens when a routine operating assumption fails.
Data Engineer Documentation and Further Reading
Check your engines and connectors for exact execution, delivery and write guarantees. Guarantees in one component do not establish an end-to-end contract.
Similar Posts
