Data Engineering Interview Questions (2026)

Practice 60 data engineering interview questions on pipelines, SQL, Airflow, Spark, Kafka, warehousing, quality checks, and production recovery.

60 questions with answers

What Is Data Engineering?

Key Takeaways

  • Data engineering builds the systems that move, store, clean, test, and serve data for analytics, machine learning, reporting, and operations.
  • Interviewers test pipeline design, SQL, data modeling, orchestration, quality checks, scale, cost, access control, and recovery from broken data.
  • Strong answers explain the data grain, freshness target, failure mode, ownership, and how the output will be trusted.
  • Prepare with SQL, Airflow, Spark, Kafka, dbt, warehousing, and cloud storage basics before memorizing tool names.

Data engineering is the work of building reliable data systems: ingestion, storage, transformation, orchestration, testing, security, monitoring, and delivery. A data engineer makes raw data usable for analytics, reporting, machine learning, and product workflows. In interviews, the best answers the business output, then work backward to the source systems, data grain, freshness target, quality checks, and failure recovery plan comes first. Tool names matter, but the interviewer is usually testing judgment: can you design a pipeline that reruns safely, handles late or bad data, keeps costs under control, and tells users when the numbers should not be trusted?

60Questions with direct answers
3Groups: foundations, build tasks, senior judgment
10+Tables, flow diagrams, SQL, Airflow, and PySpark examples
45-90 minTypical data engineering round length

Watch: How to build a data pipeline with Google Cloud

Video: How to build a data pipeline with Google Cloud (Google Cloud Tech, YouTube)

Test yourself and earn a certificate

8 quick questions. Score 70%+ to download your Data Engineering certificate.

Jump to quiz

All Questions on This Page

60 questions
Data Engineering Fundamentals
  1. 1. A recruiter says the role is pipeline heavy. What does that mean in data engineering?
  2. 2. Why do interviewers keep asking for the grain of a table?
  3. 3. When should a data engineer choose batch processing instead of streaming?
  4. 4. How do you explain ETL and ELT without sounding like you memorized a definition?
  5. 5. A hiring manager asks you to compare a warehouse, lake, and lakehouse. What is the practical answer?
  6. 6. Why does partitioning matter in warehouse and Spark interviews?
  7. 7. What does idempotency mean in a data pipeline?
  8. 8. How do incremental loads differ from full refreshes?
  9. 9. What problem does change data capture solve?
  10. 10. Which data quality checks should be in a production pipeline?
  11. 11. Why does lineage matter after the pipeline is already working?
  12. 12. What does an orchestrator like Airflow do that cron does not do well?
  13. 13. Why do data engineers prefer Parquet for analytics workloads?
  14. 14. What is a slowly changing dimension in a warehouse?
  15. 15. Why do analytics teams still use star schemas?
  16. 16. What should you say when asked about Kafka topics and partitions?
  17. 17. Why do Spark shuffles come up in data engineering interviews?
  18. 18. What is a data contract between product and data teams?
  19. 19. How should a data engineer handle PII in a pipeline?
  20. 20. What is data observability in practical terms?
Data Engineering Practical Interview Questions
  1. 21. Design a daily orders pipeline for an executive revenue dashboard.
  2. 22. You inherit a messy source system. What do you inspect before building the pipeline?
  3. 23. Build an incremental ingestion job. What does the first version need?
  4. 24. What makes an Airflow DAG ready to use?
  5. 25. A source adds, removes, or renames a column. How should the pipeline handle it?
  6. 26. How do you run a backfill without breaking current reporting?
  7. 27. How would you dedupe events that arrive more than once?
  8. 28. Your dashboard closes at 8 AM, but events can arrive late. What do you do?
  9. 29. How do you choose a partition column for a large fact table?
  10. 30. A warehouse query suddenly costs five times more. What do you check first?
  11. 31. A Spark job runs for two hours. What is your first debugging path?
  12. 32. Kafka consumer lag is growing. How do you respond?
  13. 33. How do you load CDC events into a warehouse table?
  14. 34. Where do dbt tests fit in a data engineering answer?
  15. 35. How would you implement Type 2 history for customer plans?
  16. 36. How do you monitor that important tables are fresh?
  17. 37. How do you keep data platform costs under control?
  18. 38. A dashboard owner asks where a metric comes from. How do you document it?
  19. 39. You need to ingest customer data with emails and phone numbers. What controls do you add?
  20. 40. How do you ingest data from a rate-limited SaaS API?
Data Engineering Advanced Scenarios
  1. 41. A source team renames customer_id to account_id without notice. What do you do first?
  2. 42. A VP says the revenue dashboard changed by 12 percent overnight. How do you investigate?
  3. 43. Your payments table doubled one gateway's transactions. What is the safest response?
  4. 44. A critical pipeline misses its 7 AM SLA twice in one week. What changes do you make?
  5. 45. A streaming job keeps running out of memory. What do you inspect?
  6. 46. An API sends nested JSON and changes its structure weekly. How do you design for it?
  7. 47. You need to backfill three years of orders after fixing a tax calculation. How do you reduce risk?
  8. 48. A platform stores data for many customers. How do you prevent cross-tenant leaks?
  9. 49. Legal asks you to delete user data after a retention period. What must the pipeline support?
  10. 50. A candidate says the streaming pipeline is exactly once. What follow-up should you expect?
  11. 51. How do you prove the warehouse matches the source system?
  12. 52. Design a customer 360 table. What do you clarify before building it?
  13. 53. How would you migrate a chain of cron jobs into Airflow?
  14. 54. A warehouse bill doubles in one week. What is your senior-level answer?
  15. 55. A producer sends malformed Kafka messages. What should the consumer do?
  16. 56. A bad deploy corrupts a trusted table. How do you recover?
  17. 57. A model performs worse because feature data is stale. What do you check?
  18. 58. An auditor asks how a reported metric was produced. What evidence should you provide?
  19. 59. A new pipeline release breaks a downstream dashboard. What is your release process next time?
  20. 60. How do you discuss centralized data teams versus domain-owned data in an interview?

Data Engineering Fundamentals

Foundational20 questions

Start here. These are the definitions and first-principle checks that open most rounds.

Q1. A recruiter says the role is pipeline heavy. What does that mean in data engineering?

A data pipeline is a set of steps that moves data from source systems to a usable target such as a warehouse table, dashboard, feature table, or operational tool.

In an interview, define the source, transformation logic, schedule, storage layer, tests, monitoring, and owner. A pipeline is not only code. It also includes contracts, rerun behavior, alerting, and user trust.

Simple pipeline path

1Source
database, app events, SaaS API, files
2Ingest
batch job, CDC, stream, connector
3Transform
clean, join, dedupe, model
4Serve
warehouse, mart, feature table, sync
5Observe
tests, freshness, alerts, lineage

the key signal is the checks around the pipeline, not only the happy path.

Key point: The user of the data matters. A pipeline without a user, metric, or downstream contract is hard to judge.

Watch a deeper explanation

Video: How to build a data pipeline with Google Cloud (Google Cloud Tech, YouTube)

Q2. Why do interviewers keep asking for the grain of a table?

Data grain means what one row represents: one order, one order item, one customer per day, one event, or one account snapshot.

Grain is the base of data modeling. If you miss it, joins duplicate rows, metrics drift, and tests look correct while the output is wrong. The grain comes before primary keys, dimensions, or aggregations.

  • Order grain: one row per order.
  • Order item grain: one row per product inside an order.
  • Snapshot grain: one row per entity per time period.
  • Event grain: one row per user action or system event.

Key point: A clear grain statement is often the difference between a junior and mid-level data modeling answer.

Q3. When should a data engineer choose batch processing instead of streaming?

Choose batch when the business can wait for scheduled data and the workload benefits from simpler orchestration, lower cost, easier reconciliation, and easier backfills.

Choose streaming when the decision loses value if data arrives late: fraud checks, alerts, real-time personalization, operational monitoring, or live inventory. Do not pick streaming just because it sounds advanced.

NeedBetter fitReason
Daily executive dashboardBatchFresh once a day is enough and reconciliation matters
Payment fraud decisionStreamingThe decision must happen before or during the transaction
Monthly finance closeBatchAuditability and stable snapshots matter more than speed
Clickstream session alertStreamingLow-latency event handling changes the response

Key point: Say the latency target in numbers. Seconds, minutes, hourly, and daily lead to different designs.

Q4. How do you explain ETL and ELT without sounding like you memorized a definition?

ETL transforms data before loading it into the target system. ELT loads raw data first, then transforms it inside the warehouse or lakehouse.

A practical answer ties the choice to control and compute. ETL is useful when data must be cleaned before storage or the target is limited. ELT works well when cloud storage and warehouse compute can hold raw history and run repeatable transforms.

PointETLELT
Raw historyOften not stored in the targetStored before transformation
Compute locationExternal processing layerWarehouse or lakehouse
Governance riskTransformation may hide source detailRaw sensitive data needs strong access control
Common toolsSpark, Glue, custom jobsdbt, SQL, warehouse tasks

Q5. A hiring manager asks you to compare a warehouse, lake, and lakehouse. What is the practical answer?

A warehouse stores structured, modeled data for analytics. A data lake stores raw or semi-structured files cheaply. A lakehouse adds warehouse-style tables, transactions, and governance on top of lake storage.

The interview answer should mention workload fit. Warehouses are strong for BI and SQL analytics. Lakes are useful for raw history, logs, and flexible processing. Lakehouses try to give teams both low-cost storage and managed table behavior.

  • Warehouse: curated tables, SQL, BI, governed metrics.
  • Lake: raw files, many formats, low storage cost, flexible processing.
  • Lakehouse: open storage plus table formats, schema, transactions, and analytics.

Watch a deeper explanation

Video: What is Apache Airflow? For beginners (Apache Airflow, YouTube)

Q6. Why does partitioning matter in warehouse and Spark interviews?

Partitioning splits data by values such as date, region, or event type so queries and jobs can read only the relevant slices.

Good partitioning lowers scan cost and job time. Bad partitioning creates too many small files, hot partitions, or full scans. In interviews, the partition column connects to the common filter and the arrival pattern.

sql
CREATE TABLE analytics.orders_daily (
  order_id STRING,
  customer_id STRING,
  order_total NUMERIC,
  order_date DATE
)
PARTITION BY order_date;

Key point: Mention both sides: partition pruning helps, but too many tiny partitions can slow the system down.

Q7. What does idempotency mean in a data pipeline?

An idempotent pipeline can run again for the same input without creating duplicates, changing totals incorrectly, or corrupting the target.

Use stable keys, deterministic transforms, overwrite-by-partition, merge statements, or checkpoints. In interviews, say how a retry behaves after a task fails halfway through a load.

sql
MERGE INTO marts.orders AS target
USING staging.orders AS source
ON target.order_id = source.order_id
WHEN MATCHED THEN UPDATE SET
  status = source.status,
  updated_at = source.updated_at
WHEN NOT MATCHED THEN INSERT (
  order_id, status, updated_at
) VALUES (
  source.order_id, source.status, source.updated_at
);

Key point: If your answer includes retries but not idempotency, the interviewer may push on duplicate rows.

Q8. How do incremental loads differ from full refreshes?

A full refresh rebuilds all target data. An incremental load processes only new or changed records since a known checkpoint, watermark, timestamp, or version.

Incremental loads cut cost and time, but they need a clean change signal and a backfill plan. Interviewers often ask about late-arriving records because timestamp-only filters miss updates that arrive out of order.

  • Use a high-watermark when source timestamps are trustworthy.
  • Use CDC when deletes and updates must be captured.
  • Use overlap windows when late records are common.
  • Keep a full refresh path for recovery and audits.

Q9. What problem does change data capture solve?

Change data capture, or CDC, captures inserts, updates, and deletes from a source system so downstream systems can stay in sync without scanning the whole source every time.

CDC is useful for large operational databases, near-real-time replicas, and audit trails. A strong answer mentions ordering, schema changes, delete handling, replay, and what happens when the connector falls behind.

Key point: Do not describe CDC as a magic sync. Explain the log, connector, offset, and recovery behavior.

Q10. Which data quality checks should be in a production pipeline?

Production pipelines need checks for freshness, schema, nulls, uniqueness, accepted values, row counts, referential integrity, ranges, and reconciliation with source totals.

The checks should match business risk. A customer table may need uniqueness and valid email checks. A payments table needs reconciliation and duplicate controls. A dashboard mart needs freshness and metric drift checks.

CheckWhat it catchesExample
FreshnessPipeline did not updateorders_daily updated before 8 AM
UniquenessDuplicate business keysone row per order_id
Accepted valuesInvalid categoriesstatus in paid, failed, refunded
ReconciliationMissing or extra moneywarehouse total matches payment gateway total

Q11. Why does lineage matter after the pipeline is already working?

Data lineage shows where a dataset came from, what transformed it, and which downstream tables, dashboards, models, or syncs depend on it.

Lineage helps with impact analysis, audits, incident response, and trust. If a source column changes, lineage tells you what breaks. If a metric is wrong, lineage helps trace the fault back to the right stage.

Key point: Mention impact analysis. That is the interview signal beyond a textbook definition.

Q12. What does an orchestrator like Airflow do that cron does not do well?

An orchestrator defines task dependencies, schedules jobs, retries failures, tracks state, manages backfills, exposes logs, and shows pipeline status in one place.

Cron can run a script. It does not understand that one task must wait for another table, that a failed partition needs a retry, or that a backfill should run for a date range. Airflow models that workflow as a DAG.

python
from airflow import DAG
from airflow.operators.bash import BashOperator
from datetime import datetime

with DAG(
    dag_id="orders_daily",
    start_date=datetime(2026, 1, 1),
    schedule="@daily",
    catchup=False,
) as dag:
    extract = BashOperator(task_id="extract_orders", bash_command="python extract.py")
    transform = BashOperator(task_id="build_mart", bash_command="python transform.py")
    test = BashOperator(task_id="run_checks", bash_command="python checks.py")

    extract >> transform >> test

Key point: The technical detail include dependencies and backfills, not only scheduling.

Q13. Why do data engineers prefer Parquet for analytics workloads?

Parquet is a columnar file format. It stores data by column, supports compression, and lets engines read only the columns needed for a query.

It is a strong fit for analytics because queries often scan a few columns across many rows. CSV is easier to inspect, but it lacks schema, type safety, compression, and column pruning.

FormatGood forLimit
CSVSimple exchange and manual inspectionNo rich schema and poor scan efficiency
JSONNested API payloads and logsLarge files and expensive parsing
ParquetColumnar analytics and data lakesHarder to inspect by hand
AvroRow-based streaming and schema evolutionLess efficient for column scans

Watch a deeper explanation

Video: Introduction to Streaming Data Pipelines (Confluent, YouTube)

Q14. What is a slowly changing dimension in a warehouse?

A slowly changing dimension stores how descriptive attributes change over time, such as a customer's plan, region, or account manager.

Type 1 overwrites the old value. Type 2 keeps history by adding a new row with effective dates or current flags. Interviewers ask this because business reports often need to know what was true at the time of an event.

sql
SELECT
  order_id,
  customer_id,
  order_date,
  plan_name
FROM fact_orders o
JOIN dim_customer_history c
  ON o.customer_id = c.customer_id
 AND o.order_date >= c.valid_from
 AND o.order_date < COALESCE(c.valid_to, DATE '9999-12-31');

Q15. Why do analytics teams still use star schemas?

A star schema organizes data into fact tables for measurable events and dimension tables for descriptive context.

It makes BI queries easier, reduces metric confusion, and gives teams a stable model for dashboards. In interviews, the business process, define the fact grain, then attach dimensions such as customer, product, time, and region comes first.

Star schema mental model

1Fact
orders, payments, sessions, tickets
2Grain
one row per event or snapshot
3Measures
amount, count, duration, quantity
4Dimensions
customer, product, channel, date

Always The grain before listing dimensions.

Q16. What should you say when asked about Kafka topics and partitions?

A Kafka topic is a named stream of records. Partitions split that stream so data can be stored, read, and processed in parallel while preserving order inside each partition.

Ordering is not global across the topic. It is only guaranteed within a partition. A good answer explains the partition key, consumer group behavior, offsets, replay, retention, and what happens when a consumer lags.

Key point: If the question includes ordering, The partition key immediately matters.

Q17. Why do Spark shuffles come up in data engineering interviews?

A Spark shuffle moves data across executors so records with the same key can be grouped, joined, sorted, or aggregated together.

Shuffles are expensive because they move data over the network and write intermediate files. Reduce them by filtering early, selecting needed columns, using broadcast joins for small tables, and choosing partition keys carefully.

python
from pyspark.sql.functions import broadcast

orders = spark.read.parquet("s3://lake/orders/date=2026-07-05")
customers = spark.read.parquet("s3://lake/dim_customers")

result = (
    orders
    .filter("status = 'paid'")
    .join(broadcast(customers), "customer_id", "left")
    .select("order_id", "customer_id", "region", "order_total")
)

Key point: Do not say Spark is slow. Say what caused the shuffle and what you would change.

Q18. What is a data contract between product and data teams?

A data contract defines what a producer promises to send: schema, types, allowed values, freshness, meaning, ownership, and change process.

Contracts reduce silent breakage. If product removes a field, changes an event name, or changes timestamp meaning, downstream tables and dashboards can fail. A contract makes those changes visible before users see wrong data.

  • Schema and field meanings.
  • Required fields and allowed values.
  • Freshness or delivery target.
  • Owner, review path, and versioning rule.

Q19. How should a data engineer handle PII in a pipeline?

Personally identifiable information should be classified, minimized, masked or tokenized where possible, encrypted in storage and transit, and restricted by role-based access.

Also mention retention, audit logs, deletion requests, and separate raw zones from curated zones. A data engineer is often responsible for making the safe path easy, not only writing transformation code.

RiskControl
Raw emails in analyst tablesHash, mask, or keep in restricted schema
Wide access to raw eventsRole-based access and column policies
Unknown downstream copiesLineage and retention rules
Debug logs with secretsRedaction and log review

Q20. What is data observability in practical terms?

Data observability is the ability to detect, diagnose, and explain data problems through signals such as freshness, volume, schema, distribution, lineage, and quality tests.

It turns pipeline failures and silent data drift into visible incidents. A strong interview coverage names alert thresholds, owners, severity, runbooks, and user communication when a trusted table is stale or wrong.

Back to question list

Data Engineering Practical Interview Questions

Intermediate20 questions

These questions test whether you can apply the topic to real data, real code, and messy constraints.

Q21. Design a daily orders pipeline for an executive revenue dashboard.

the dashboard metric: revenue by day, product, region, and channel comes first. Then define the order source, table grain, late-arriving order rule, quality checks, and refresh deadline.

A simple design is a daily batch pipeline: ingest orders, dedupe by order_id, join stable dimensions, write a partitioned fact table, run reconciliation against the source, then publish only if checks pass.

Daily revenue pipeline

1Extract
orders changed since last run
2Stage
raw partition plus load metadata
3Transform
dedupe, normalize status, join dimensions
4Test
row count, uniqueness, totals, freshness
5Publish
swap or update dashboard table

Publish after tests, not before.

Key point: the design maps to a visible business output. Otherwise the answer becomes a tool inventory.

Q22. You inherit a messy source system. What do you inspect before building the pipeline?

Inspect ownership, schema, primary keys, update and delete behavior, timestamp meaning, volume, rate limits, nulls, duplicates, and past incidents.

Do not start by writing the DAG. Start by proving whether the source can support the target table. Ask who owns the source, whether backfills are allowed, and how changes are announced.

  • System of record and owner.
  • Business keys and uniqueness.
  • Create, update, delete, and soft-delete behavior.
  • Timezone and timestamp semantics.
  • Retention, PII, and rate limits.

Q23. Build an incremental ingestion job. What does the first version need?

It needs a source filter, checkpoint or watermark, staging table, merge into the target, data quality checks, and a way to rerun a time range safely.

Use a small overlap window if records can arrive late. Store load metadata such as run_id, loaded_at, source_count, target_count, and checkpoint value so failures can be audited.

sql
WITH changed AS (
  SELECT *
  FROM raw.orders
  WHERE updated_at >= (
    SELECT COALESCE(MAX(checkpoint_at), TIMESTAMP '1970-01-01')
    FROM audit.pipeline_runs
    WHERE pipeline_name = 'orders_incremental'
      AND status = 'success'
  ) - INTERVAL '2 hour'
)
SELECT * FROM changed;

Q24. What makes an Airflow DAG ready to use?

A good DAG has clear task boundaries, explicit dependencies, retries, sensible timeouts, alerts, parameterized dates, and idempotent task logic.

Do not put all logic inside one PythonOperator. Keep extract, transform, test, and publish steps visible. Use Airflow for orchestration and observability, not as a place to hide every line of business logic.

  • Clear task names that match the data flow.
  • Retries only for safe, idempotent tasks.
  • SLA or alert rules for user-facing tables.
  • Backfill support through execution dates or parameters.
  • Logs that show source counts, target counts, and checks.

Key point: Interviewers often push on backfills and retries. Be ready to explain both.

Q25. A source adds, removes, or renames a column. How should the pipeline handle it?

Handle schema change through contracts, validation, versioning, compatibility rules, and alerting. Do not let unexpected changes silently flow into trusted tables.

For additive fields, staging can usually accept the new column while curated models decide whether to expose it. For removed or renamed fields, fail fast or route records to quarantine until the owner confirms the change.

ChangeLikely actionWhy
New optional columnAccept in raw, review in curated modelBackward compatible
Required column removedFail or quarantineDownstream logic may be wrong
Type changeValidate and versionCasts can hide bad data
Meaning changedUpdate contract and metric docsSame field name can produce different numbers

Watch a deeper explanation

Video: Streaming data from Kafka to external systems (Confluent, YouTube)

Q26. How do you run a backfill without breaking current reporting?

Run the backfill in controlled partitions or a separate target, validate counts and metrics, then swap or merge after checks pass.

Backfills should use the same transformation code as normal runs. If the logic changed, tag the version and document the metric impact. Protect current dashboards from half-filled tables.

  • Confirm date range, source retention, and expected row counts.
  • Run in partitions or a temporary target.
  • Compare old and new metrics before publishing.
  • Keep audit records for who approved the change.

Q27. How would you dedupe events that arrive more than once?

Find the business key or event id, choose the winning record rule, and make the dedupe step deterministic.

For app events, dedupe by event_id when available. If not, use a composite key such as user_id, event_name, event_time, and source request id. Choose latest ingestion time only when it matches the business rule.

sql
WITH ranked AS (
  SELECT
    *,
    ROW_NUMBER() OVER (
      PARTITION BY event_id
      ORDER BY ingested_at DESC
    ) AS rn
  FROM staging.events
)
SELECT *
FROM ranked
WHERE rn = 1;

Q28. Your dashboard closes at 8 AM, but events can arrive late. What do you do?

Set a clear lateness policy: overlap recent partitions, mark data freshness, and decide whether late events update closed periods or go into an adjustment table.

The answer depends on the business. Finance may need locked periods with adjustments. Product analytics may accept recomputing the last few days. The important part is making the rule visible and repeatable.

Late data handling

1Detect
compare event_time and ingested_at
2Buffer
keep an overlap window
3Recompute
rerun affected partitions
4Publish
show freshness and caveat

The technical detail include the user's expectation, not only code.

Q29. How do you choose a partition column for a large fact table?

Choose a column that matches common filters, arrival pattern, retention rules, and backfill needs. Date partitions are common because most analytics queries filter by time.

Avoid high-cardinality partitions such as user_id when they create too many small pieces. Use clustering or sorting for common secondary filters where the platform supports it.

  • Partition by event_date, order_date, or snapshot_date when time filtering dominates.
  • Use clustering for customer_id, region, or status when queries often filter within date ranges.
  • Keep partition count manageable.
  • Design for deletion and retention if privacy rules apply.

Q30. A warehouse query suddenly costs five times more. What do you check first?

Check scan volume, partition pruning, join explosion, repeated subqueries, changed filters, statistics, and whether an upstream table got much larger.

Use the query plan or job history. The fix might be partition filters, pre-aggregation, removing unnecessary columns, materializing a repeated step, or correcting a bad join key.

SymptomLikely causeFix
Full table scanMissing partition filterFilter by partition column
Rows multiply after joinNon-unique join keyFix grain or aggregate first
Repeated expensive CTEEngine recomputes itMaterialize or refactor
Tiny file overheadToo many small loadsCompact files or batch writes

Q31. A Spark job runs for two hours. What is your first debugging path?

Check the Spark UI for stage time, shuffle read and write, skewed tasks, failed tasks, spill, input size, partition count, and join strategy.

Then reduce data early, select fewer columns, fix skew, broadcast small dimensions, tune partitions, and write fewer larger files. Avoid guessing from code alone.

  • Find the slow stage before editing code.
  • Look for one or two tasks much slower than the rest.
  • Check shuffle size and spill to disk.
  • Confirm whether the join should broadcast.

Q32. Kafka consumer lag is growing. How do you respond?

Check whether producers sped up, consumers slowed down, partitions are uneven, processing time increased, broker health changed, or downstream writes are throttled.

Short-term fixes may include scaling consumers up to the partition count, reducing per-message work, batching writes, or pausing non-critical consumers. Long-term fixes need metrics on throughput and processing time.

Consumer lag triage

1Measure
lag, input rate, processing rate
2Locate
producer, broker, consumer, sink
3Stabilize
scale, batch, pause, retry safely
4Prevent
alerts, capacity, partition plan

Lag is a symptom. The technical detail locate the bottleneck.

Q33. How do you load CDC events into a warehouse table?

Ingest the ordered change stream, stage raw events with operation type and log position, then apply inserts, updates, and deletes into the target with deterministic ordering.

Keep the raw CDC history for replay. Handle schema versions, tombstones, out-of-order events, and connector restarts. The warehouse table should be the current state or a history table, depending on the use case.

  • Store source primary key, operation type, event time, and log sequence.
  • Apply changes in source order per primary key.
  • Treat deletes explicitly.
  • Keep enough raw log history to replay after a bad merge.

Q34. Where do dbt tests fit in a data engineering answer?

Use dbt tests after transformations to prove assumptions such as uniqueness, not-null fields, accepted values, relationships, and business rules.

Tests should protect trusted models, not only raw staging. The direct answer is what happens when a test fails: stop publish, alert the owner, and keep stale data marked rather than silently replacing it.

yaml
models:
  - name: dim_customers
    columns:
      - name: customer_id
        tests:
          - not_null
          - unique
      - name: plan_name
        tests:
          - accepted_values:
              values: ['free', 'starter', 'growth', 'enterprise']

Q35. How would you implement Type 2 history for customer plans?

Compare the current dimension row with the incoming source row. If tracked attributes changed, close the old row and insert a new row with a new valid_from date.

Use a stable customer_id, effective dates, current flag, and a hash of tracked attributes. Make the process idempotent so reruns do not create extra history rows.

  • Track only attributes that need history.
  • Close the previous current row when a value changes.
  • Insert the new current row with valid_from and open valid_to.
  • Join facts to the row valid at event time.

Q36. How do you monitor that important tables are fresh?

Store expected update times and compare them with the latest successful load time, latest source event time, and downstream publish time.

Freshness alerts includes severity and owner. A sales dashboard missing by ten minutes may be low severity. A fraud feature table stale by ten minutes may be urgent.

sql
SELECT
  table_name,
  MAX(loaded_at) AS last_loaded_at,
  CURRENT_TIMESTAMP - MAX(loaded_at) AS age
FROM audit.table_loads
WHERE table_name = 'fact_orders'
GROUP BY table_name
HAVING CURRENT_TIMESTAMP - MAX(loaded_at) > INTERVAL '2 hour';

Q37. How do you keep data platform costs under control?

Control scan volume, compute size, scheduling, storage lifecycle, repeated transformations, small files, retention, and user query patterns.

Cost answers should be specific. Partition large tables, materialize common marts, avoid repeated full refreshes, right-size warehouses or clusters, compact files, and set budgets or alerts.

  • Measure cost by table, job, team, and warehouse.
  • Stop repeated full scans on wide raw tables.
  • Use incremental models where correctness allows it.
  • Expire raw data that no longer has legal or business value.

Q38. A dashboard owner asks where a metric comes from. How do you document it?

Document the metric definition, source tables, transformation logic, grain, filters, owner, freshness target, and known caveats.

Then link the dashboard to the curated model, not to a hidden SQL copy. Use lineage tooling where available, but The technical detail also include plain-language ownership and definitions.

Key point: A good metric doc prevents repeated Slack archaeology during incidents.

Q39. You need to ingest customer data with emails and phone numbers. What controls do you add?

Classify the fields, restrict raw access, mask or hash where possible, encrypt data, log access, set retention, and avoid copying PII into wide analytics tables.

Build separate raw and curated zones. The curated table should expose only the fields needed by users. If downstream tools need contact attributes, use approved syncs with ownership and deletion support.

Q40. How do you ingest data from a rate-limited SaaS API?

Respect rate limits, paginate safely, checkpoint pages or cursors, retry transient errors with backoff, and store raw responses before transformation.

Also handle schema drift, authentication expiry, duplicate pages, and vendor downtime. The technical detail is audit logs for request count, response count, and last successful cursor.

  • Use cursor or updated_at filters when available.
  • Persist the raw payload and metadata.
  • Retry only safe failures with backoff.
  • Alert when the vendor response shape changes.
Back to question list

Data Engineering Advanced Scenarios

Advanced20 questions

Advanced rounds test trade-offs, failure modes, and whether the decision can hold up under production pressure.

Q41. A source team renames customer_id to account_id without notice. What do you do first?

Stop the trusted publish path, alert the owner, confirm whether the meaning changed, and patch staging only after the contract is updated.

A fast alias may restore the pipeline, but it can hide a semantic change. Check row counts, joins, duplicates, and downstream metrics before reopening the table.

  • Preserve the raw payload for investigation.
  • Confirm field meaning, not only field name.
  • Backfill affected partitions after the fix.
  • Add a schema test or contract check to catch repeat issues.

Q42. A VP says the revenue dashboard changed by 12 percent overnight. How do you investigate?

Work backward from the metric to the mart, transform, staging, and source totals. Compare row counts, changed records, filters, joins, and recent deploys.

Do not a code rewrite comes first. First establish whether the business changed, the source changed, or the pipeline changed. Then communicate whether the dashboard is trustworthy while the investigation runs.

Metric incident path

1Confirm
which metric, date range, segment
2Compare
today vs yesterday and source total
3Trace
mart, transform, staging, source
4Decide
rollback, patch, or explain valid change

The production-ready answer separates data incident from real business movement.

Q43. Your payments table doubled one gateway's transactions. What is the safest response?

Freeze publish for affected partitions, identify the duplicate key, compare with the gateway source, fix the dedupe logic, and republish after reconciliation passes.

Payments need stronger controls than many event streams. Use gateway transaction id where possible, keep an audit table of rejected duplicates, and communicate affected periods to finance.

StepReason
Freeze publishStop wrong totals from spreading
Reconcile sourceProve the true transaction count
Fix deterministic keyAvoid deleting valid retries
Republish with audit noteFinance needs traceability

Watch a deeper explanation

Video: Modeling for success: Building data structures that last (dbt Labs, YouTube)

Q44. A critical pipeline misses its 7 AM SLA twice in one week. What changes do you make?

Find the slow or unstable stage, set stage-level alerts, add capacity or scheduling changes, and create a runbook for the owner.

Also review whether the SLA is realistic. If the source lands at 6:55 AM and the transform takes 20 minutes, the 7 AM promise is impossible without changing the source, scope, or compute plan.

Q45. A streaming job keeps running out of memory. What do you inspect?

Inspect state size, window length, cardinality, late event policy, checkpoint growth, batch size, and sink backpressure.

Large state usually comes from long windows, high-cardinality keys, or late data kept too long. Reduce state, set watermarks, tune partitions, and confirm the sink can keep up.

  • Check whether state grows without bounds.
  • Look for hot keys and skew.
  • Set watermarks based on real lateness.
  • Measure sink write time before tuning compute only.

Q46. An API sends nested JSON and changes its structure weekly. How do you design for it?

Store raw payloads, extract stable fields into typed staging columns, version parsing logic, and alert when required fields disappear or change type.

Do not flatten every field into a trusted table immediately. Keep raw history for replay, then expose curated fields only when the contract and business meaning are stable.

Q47. You need to backfill three years of orders after fixing a tax calculation. How do you reduce risk?

Run the corrected logic in a separate target by partition, compare totals with the old output and finance source, then publish after approval.

Backfills change history. Keep old and new versions long enough to audit the difference, document the metric impact, and avoid rebuilding all partitions in one unmonitored job.

Q48. A platform stores data for many customers. How do you prevent cross-tenant leaks?

Use tenant-aware access controls, row filters, separate encryption or storage boundaries where needed, tests for tenant isolation, and strict review on shared models.

In interviews, explain both design and verification. A query filter alone is not enough if analysts can access raw shared tables. Add policy checks and automated tests using known tenant ids.

Q49. Legal asks you to delete user data after a retention period. What must the pipeline support?

The pipeline must know where user data exists, delete or anonymize it according to policy, update derived tables, and keep audit evidence without retaining restricted values.

Lineage is critical here. If user_id appears in raw events, curated tables, feature stores, exports, and backups, the deletion workflow must cover each copy or define a compliant retention exception.

Q50. A candidate says the streaming pipeline is exactly once. What follow-up should you expect?

Expect questions about where exactly once applies: source reads, state updates, sink writes, retries, dedupe keys, and transactional guarantees.

A careful answer avoids overclaiming. Many systems provide exactly-once processing within part of the pipeline, but the sink or external side effect may still need idempotent writes.

AreaQuestion to answer
SourceCan offsets replay safely?
ProcessingIs state checkpointed consistently?
SinkAre writes transactional or idempotent?
Business outputCan users see duplicates after retries?

Q51. How do you prove the warehouse matches the source system?

Reconcile counts, sums, date ranges, primary keys, and status distributions between source and target at the same grain and cutoff time.

Use source snapshots or extraction audit logs so both sides compare the same time window. For money, reconcile amounts by currency, gateway, and date, not only a total row count.

sql
SELECT
  order_date,
  COUNT(*) AS order_count,
  SUM(order_total) AS revenue
FROM fact_orders
WHERE order_date BETWEEN DATE '2026-07-01' AND DATE '2026-07-31'
GROUP BY order_date
ORDER BY order_date;

Q52. Design a customer 360 table. What do you clarify before building it?

Clarify users, grain, source priority, identity resolution, freshness, PII rules, and whether the output is for analytics, sales sync, ML, or product use.

A customer 360 table often joins CRM, billing, product events, support, and marketing data. The hard part is not the join. It is defining the customer entity and conflict rules across systems.

Q53. How would you migrate a chain of cron jobs into Airflow?

Inventory each script, input, output, schedule, dependency, owner, and failure behavior. Then migrate in small DAGs with the same outputs and better observability.

Do not rewrite all logic first. Wrap stable scripts, expose dependencies, add retries and alerts, then refactor business logic after the new orchestration path is proven.

Q54. A warehouse bill doubles in one week. What is your senior-level answer?

Break cost down by job, user, warehouse, table, and schedule. Identify new workloads, query plan changes, larger inputs, and repeated full refreshes.

Then fix the cause: partition filters, incremental models, warehouse sizing, materialized marts, query review, budgets, or retention changes. Cost control should not silently remove data quality checks.

Q55. A producer sends malformed Kafka messages. What should the consumer do?

The consumer should validate messages, send bad records to a dead-letter path with error context, alert the owner, and continue processing valid records when safe.

Do not drop bad messages silently. Keep enough payload and metadata to debug, but redact sensitive fields. If the malformed rate crosses a threshold, fail the pipeline or page the producer owner.

Bad message handling

1Validate
schema and required fields
2Route
good path or dead-letter path
3Alert
owner and severity threshold
4Replay
fix producer, then reprocess

A dead-letter path is useful only when someone owns it.

Watch a deeper explanation

Video: Fundamentals of Apache Spark and Azure Databricks (Microsoft Developer, YouTube)

Q56. A bad deploy corrupts a trusted table. How do you recover?

Stop downstream publish, identify the bad run, restore the last good version or partition, fix the transform, rerun affected data, and document user impact.

Recovery depends on having versioned tables, partitioned writes, raw replay data, and audit logs. If those do not exist, say what you would add after the incident.

Q57. A model performs worse because feature data is stale. What do you check?

Check feature freshness, training-serving skew, source delays, pipeline failures, null spikes, and whether online and offline feature logic still match.

Data engineering for ML needs stronger freshness and consistency checks than many dashboards. Add feature-level freshness alerts and compare online serving values against offline backfills.

Q58. An auditor asks how a reported metric was produced. What evidence should you provide?

Provide metric definition, source systems, transformation code version, run logs, data quality checks, lineage, access records, and reconciliation outputs.

The technical detail sound boring and traceable. Audits punish mystery. A strong platform can explain what data existed, what code ran, when it ran, who had access, and what checks passed.

Q59. A new pipeline release breaks a downstream dashboard. What is your release process next time?

Add staging outputs, backward-compatible schema changes, contract tests, canary runs, downstream impact checks, and a rollback path.

Data releases need deployment discipline. Rename columns, grain changes, and metric changes should be versioned or announced before the old output disappears.

Q60. How do you discuss centralized data teams versus domain-owned data in an interview?

Frame it as an ownership trade-off. Central teams improve consistency and shared standards. Domain teams understand source meaning better. Most companies need both with clear contracts.

Avoid slogans. Say which team owns source events, which team owns shared marts, who approves metric definitions, and how quality rules are enforced across domains.

Back to question list

ETL vs ELT vs Streaming Pipelines

Data engineering interviews often test whether you can choose the right pipeline pattern. The answer depends on latency, data volume, governance, transformation complexity, and how much work the warehouse or processing layer should handle.

PatternHow it worksUse it whenInterview risk
ETLExtract, transform outside the warehouse, then load curated dataSystems need strict cleaning before storage or the target cannot run heavy transformsCandidates forget lineage and rerun behavior
ELTExtract and load raw data first, then transform inside the warehouseCloud warehouses can process the data and analysts need reusable raw historyCandidates skip access control on raw sensitive data
StreamingEvents are processed continuously from a broker or logFreshness is measured in seconds or minutesCandidates promise exact results without explaining replay, ordering, and late events
Reverse ETLCurated warehouse data is sent back to SaaS or product systemsSales, support, or product tools need trusted customer attributesCandidates ignore sync failures and downstream ownership

What interviewers weigh in a data engineering answer

The best technical choice shows correctness first, then speed, cost, and operations.

Data quality
95 signal
Rerun safety
90 signal
Modeling
82 signal
Operations
88 signal
  • Data quality: Freshness, schema, nulls, duplicates, reconciliation
  • Rerun safety: Idempotent loads, backfills, checkpoints
  • Modeling: Grain, keys, dimensions, facts
  • Operations: Monitoring, retries, alerts, ownership

How to Prepare for a Data Engineering Interview

Prepare by tracing data from source to user. A strong coverage names the output first, then the source, contract, transform, storage layer, tests, monitor, and recovery path.

  • Practice SQL for joins, windows, deduplication, slowly changing dimensions, and reconciliation.
  • Sketch one batch pipeline and one streaming pipeline from source to dashboard.
  • Review Airflow DAG structure, retries, backfills, scheduling, and task ownership.
  • Spark shuffles, partitions, file formats, and cost controls without tool hype is the explanation path.
  • One incident story where bad data reached users and how you fixed the process is useful.

Data engineering interview prep flow

1Define output
metric, table, dashboard, feature, or sync target
2Map sources
system of record, event stream, API, files, contracts
3Build pipeline
batch, streaming, CDC, transforms, storage, orchestration
4Prove trust
tests, reconciliation, freshness, lineage, alerts, owner
5Plan recovery
rerun, backfill, rollback, quarantine, incident note

Most rounds reward clear reasoning more than memorized phrasing.

How Strong Data Engineering Answers Sound

A good data engineering answer sounds like an operations plan, not a tool list. the table or event contract the user needs comes first. The data grain, source of truth, schedule, tests, and recovery path. Then explain why the chosen tool fits the latency, volume, cost, and team ownership. production-ready answers also say what can go wrong and how users will know.

Table grain before columns

If a table is one row per order, say that before discussing columns. If a dashboard needs one row per customer per day, say that. Grain controls joins, deduplication, tests, partitions, and every metric built on top of the table.

Treat reruns as a design requirement

Pipelines fail. A strong answer explains whether a task can rerun without double counting, how it identifies already processed data, and how it handles a partial load. Idempotency is one of the fastest signals of real data engineering experience.

Separate freshness from correctness

Fast wrong data is worse than slow trusted data. Say the freshness target, then say what checks must pass before users see the output. For critical tables, include a quarantine or hold step when inputs fail quality rules.

Explain cost in system terms

Do not only say a query is expensive. The driver: full table scan, skewed join, tiny files, repeated recomputation, high shuffle, or unbounded warehouse size. Then give a fix tied to the driver.

Close with ownership

The practical point is who owns the source, who owns the transform, who is paged, and how users see status. Without ownership, good pipelines still fail because nobody knows who should act when data breaks.

Test Yourself: Data Engineering Quiz

Ready to test your Data Engineering knowledge?

8 questions, about 5 minutes. Score 70% or higher to earn a shareable certificate.

8 questions Instant feedback Free certificate on 70%+

Frequently  Asked  Questions

What do data engineering interviews usually test?

They test SQL, pipeline design, data modeling, orchestration, quality checks, cloud storage, distributed processing, streaming basics, cost control, and recovery from broken data. advanced rounds focus more on failure modes, ownership, and trade-offs.

How much SQL should a data engineer know?

Know joins, aggregations, windows, deduplication, merge logic, date handling, CTEs, query plans, and reconciliation queries. SQL is still the fastest way to prove you understand data grain and metric correctness.

Do data engineering interviews require Spark or Kafka?

Many roles ask at least the basics. You should know when Spark helps with large distributed processing, when Kafka helps with event streams, and what failure modes each tool introduces. Depth depends on the job description.

What project should I discuss for a data engineering role?

Pick a project where you owned a data output that other people used. Explain the source, grain, pipeline pattern, tests, incident handling, cost or speed improvement, and how users knew the data was trustworthy.

How should freshers prepare for data engineering interviews?

SQL, Python basics, data modeling, file formats, and one simple pipeline project comes first. Build a small batch job that ingests raw data, writes a modeled table, runs tests, and documents the output.

How should experienced candidates prepare differently?

Prepare incident stories. Be ready to explain broken data, missed SLAs, backfills, schema changes, cost spikes, access control, and how you changed the process afterward. Senior candidates are judged on judgment under failure.

Pair pipeline prep with a evaluated coding round

Hyring's AI Coding Interviewer can run SQL, Python, and data transformation tasks with structured scoring. Use this page for the concepts, then practice the format before a live technical screen.

See Hyring AI Coding Interviewer

Sources

Adithyan RKWritten by Adithyan RK
Surya N
Fact-checked by Surya N
Published on: 3 Jun 2026Last updated: 23 Jun 2026
Share: