Data Engineering Interview Questions

Master your next Data Engineering interview with our comprehensive collection of questions and expert-crafted answers. Get prepared with real scenarios that top companies ask.

Find mentors at
Airbnb
Amazon
Meta
Microsoft
Spotify
Uber

Master Data Engineering interviews with expert guidance

Prepare for your Data Engineering interview with proven strategies, practice questions, and personalized feedback from industry experts who've been in your shoes.

Thousands of mentors available

Flexible program structures

Free trial

Personal chats

1-on-1 calls

97% satisfaction rate

Study Mode

Choose your preferred way to study these interview questions

1. Describe a situation where a pipeline was technically correct but too expensive to operate. What optimizations did you make?

I’d answer this with STAR: explain the business context, show that the pipeline met SLA and correctness, then focus on why cost was the real failure metric and what you changed.

At my last team, we had a Spark pipeline enriching clickstream data every 15 minutes. It was technically correct and met freshness targets, but the monthly bill was way too high because we were full-scanning large partitioned tables, over-shuffling on wide joins, and writing lots of tiny files. I profiled it with Spark UI and warehouse cost reports, then made three fixes: pruned partitions aggressively, converted a big join into an incremental merge using change data capture, and compacted outputs to better file sizes. I also moved infrequently used enrichments to a daily path instead of every run. Result, about 40 to 50 percent lower compute cost, faster runtime, same data quality and SLA.

2. How do file formats like Parquet, ORC, and Avro influence storage and query design decisions?

They drive both cost and performance, so I pick based on access pattern and engine support.

  • Parquet and ORC are columnar, great for analytics because they read only needed columns, compress well, and support predicate pushdown.
  • Avro is row-oriented, better for event streams, CDC, and write-heavy pipelines where schema evolution matters a lot.
  • For warehouse tables, I usually choose Parquet first because it is broadly supported across Spark, Trino, BigQuery external tables, and data lakes.
  • ORC can outperform in some Hive-centric stacks, especially with rich stats and ACID features in that ecosystem.
  • File format affects partitioning and small-file strategy, columnar files want larger files for scan efficiency.
  • It also affects schema design, Avro handles evolving nested records cleanly, while Parquet and ORC shine when queries aggregate a subset of columns.

3. What tradeoffs would you consider when migrating a legacy on-prem ETL stack to a cloud-native architecture?

I’d frame it around six tradeoffs: speed, cost, risk, operability, performance, and lock-in.

  • Rehost vs redesign, lift-and-shift is faster and lowers migration risk, but you carry old bottlenecks into the cloud.
  • Batch vs streaming, streaming improves freshness, but adds complexity in ordering, retries, and observability.
  • Managed services vs self-managed, managed cuts ops overhead, but can limit tuning and increase vendor lock-in.
  • Storage and compute separation, great for elasticity and cost control, but bad partitioning can spike query costs.
  • Data model changes, modernizing to lakehouse or ELT can simplify pipelines, but downstream consumers may break.
  • Security and governance, cloud gives better IAM and audit options, but you need to redesign networking, secrets, and compliance controls.

I’d usually migrate in phases, start with low-risk pipelines, set SLOs, and prove cost and reliability before deeper refactoring.

No strings attached, free trial, fully vetted.

Try your first call for free with every mentor you're meeting. Cancel anytime, no questions asked.

Nightfall illustration

4. Tell me about a time when a pipeline was producing incorrect data. How did you detect the issue, identify root cause, and restore trust?

I’d answer this with a quick STAR structure: situation, actions, result, then emphasize prevention and stakeholder trust.

At a previous team, a daily revenue pipeline started overstating numbers by about 12 percent. I caught it through a reconciliation check between our warehouse fact table and the finance system, plus a freshness and volume dashboard that showed an unusual jump. I traced it to a schema change upstream, a join key that stopped being unique after a product update, which created duplicate rows. I paused downstream dashboards, told stakeholders what was affected, backfilled the corrected data, and added uniqueness tests, source contract checks, and anomaly alerts. To restore trust, I published the incident timeline, validated numbers with finance, and monitored the pipeline closely for the next few runs.

5. What data quality checks do you consider mandatory in production pipelines?

I treat a few checks as non-negotiable, because they catch the majority of production issues before bad data spreads downstream.

  • Schema validation, column names, types, nullability, and unexpected new or missing fields.
  • Freshness checks, confirm data arrived on time and the row count is within an expected range.
  • Completeness, required fields should not be null, blank, or default garbage values.
  • Uniqueness and deduplication, primary keys or business keys should be unique where expected.
  • Referential integrity, foreign keys should match dimension or parent records.
  • Validity checks, enforce allowed ranges, formats, enums, dates, and business rules.
  • Drift and anomaly detection, monitor sudden distribution changes in key metrics.
  • Idempotency and reconciliation, reruns should not duplicate data, and totals should match source systems.

In practice, I separate hard-fail checks from warning-level checks, then wire both into alerting and dashboards.

6. How have you approached CDC, and what challenges did you encounter with change capture, ordering, and replay?

I’ve used CDC in two main ways: database log-based CDC, like Debezium on MySQL/Postgres binlogs or WAL, and warehouse-side CDC with merge patterns on append-only event streams. My default is log-based CDC because it avoids query load and captures deletes reliably.

  • For change capture, the biggest issue is schema drift and partial updates, so I version schemas and normalize events into a consistent envelope.
  • For ordering, I do not trust event time alone. I use source LSN, binlog position, or commit timestamp plus a per-table key strategy.
  • For replay, I make consumers idempotent, usually with upserts, dedupe keys, and checkpointed offsets.
  • One challenge was out-of-order updates across partitions. We fixed it by partitioning by business key and applying last-write-wins only with trusted source sequence fields.
  • Another was snapshot plus streaming overlap, so we used watermarking to avoid double-processing.

7. Walk me through a data pipeline you designed end to end, including ingestion, transformation, storage, orchestration, and downstream consumption.

I usually answer this kind of question by walking top to bottom through the architecture, then calling out tradeoffs and impact.

One pipeline I built handled clickstream and order data for near real-time revenue reporting. We ingested app events from Kafka and batch ERP extracts from S3. For transformation, I used Spark on Databricks to standardize schemas, dedupe with event IDs, apply CDC logic, and build curated fact and dimension tables. Raw landed in a bronze layer, cleaned data in silver, and business-ready models in Snowflake gold tables. Airflow orchestrated dependencies, retries, SLAs, and backfills. Downstream, Looker dashboards and reverse ETL fed finance and marketing tools. I also added data quality checks with Great Expectations, partitioning and clustering for performance, and lineage docs. The result was cutting report latency from next day to under 15 minutes.

8. Tell me about a time you had to say no to a data request or push back on an unrealistic timeline. How did you handle it?

I’d answer this with a quick STAR structure: situation, why I pushed back, how I reframed it, and the outcome.

At one company, a product team asked for a brand new executive dashboard in three days, but the source data had quality issues and no agreed metric definitions. I said no to the timeline, not the business need. I explained the risks clearly: we could ship fast, but executives might make decisions on inconsistent numbers. Then I proposed a phased plan, a lightweight version in one week with validated core KPIs, followed by deeper cuts later. I also got alignment from the PM and analytics lead on metric definitions. The result was we delivered something credible, avoided a messy rework cycle, and built more trust because I was transparent and solution-oriented.

User Check

Find your perfect mentor match

Get personalized mentor recommendations based on your goals and experience level

Start matching

9. How do you decide whether a workload belongs in a data lake, data warehouse, or lakehouse architecture?

I decide based on workload shape, data type, latency, and governance needs, not hype.

  • Use a data lake for cheap, large scale storage of raw, semi structured, or unstructured data, especially when schemas evolve and data science needs full fidelity data.
  • Use a data warehouse for highly curated, structured data with strong SQL performance, BI reporting, dimensional models, and strict governance.
  • Use a lakehouse when you want both, low cost object storage plus warehouse style ACID tables, SQL, and governance on one platform.
  • If workloads are mostly dashboards and finance reporting, warehouse wins.
  • If it is ML feature engineering, clickstream, logs, or multi format ingestion, lake or lakehouse usually fits better.

In practice, I also check concurrency, SLA, cost predictability, tool fit, and team skills.

10. What factors do you consider when choosing between batch processing and stream processing for a business use case?

I usually frame it around latency, correctness, and cost. The right choice depends on how quickly the business needs to act, and how much complexity they’re willing to operate.

  • If the business needs action in seconds or minutes, like fraud alerts or live dashboards, I lean stream processing.
  • If hourly or daily updates are fine, like finance reporting or customer segmentation, batch is simpler and cheaper.
  • I look at data volume and arrival pattern, continuous event flow fits streaming, large scheduled extracts fit batch.
  • I consider correctness needs, streaming adds challenges like out of order events, deduplication, and exactly-once semantics.
  • I also check downstream consumers, if models, APIs, or alerts depend on fresh data, streaming adds value; otherwise batch is often enough.

Sometimes a hybrid works best, streaming for operational use cases, batch for reconciliation and historical accuracy.

11. Describe a time you had to redesign a pipeline because of scale, latency, or cost issues. What changed and why?

I’d answer this with a quick STAR structure: situation and problem, what I changed technically, then the measurable impact.

At my last team, we had a batch ingestion pipeline moving clickstream data from Kafka to a warehouse every 30 minutes. Volume grew about 8x, and we started missing SLAs, plus warehouse compute costs spiked because large merge jobs were constantly reprocessing late-arriving data. - I profiled the bottleneck and found small files, inefficient upserts, and no clear hot vs cold data strategy. - I redesigned it into a micro-batch pipeline with partitioning by event date and clustering by customer ID. - I introduced a staging layer, dedup logic before load, and changed full merges to incremental upserts. - I also moved older data to cheaper object storage and kept only recent data in high-performance tables. - Result, latency dropped from 30 minutes to under 5, and compute cost fell by roughly 40%.

12. How do you model data differently for analytics, operational reporting, and machine learning use cases?

I model based on the access pattern, latency, and how much transformation the consumer can tolerate.

  • Analytics, I optimize for flexible slicing and historical analysis. Star schemas, facts and dimensions, denormalized enough for fast BI queries, with slowly changing dimensions when history matters.
  • Operational reporting, I stay closer to source systems because freshness and accuracy matter more than broad exploration. Usually normalized or lightly denormalized models, clear business keys, and strict reconciliation.
  • Machine learning, I model around entities and time. Feature tables are wide, consistent, point-in-time correct, and built to avoid leakage. I also keep training and serving definitions aligned.
  • Across all three, I care about data contracts, lineage, and grain. The biggest mistake is using one model for every workload.

13. Explain the difference between OLTP and OLAP systems and how that distinction affects data engineering decisions.

OLTP and OLAP serve very different workloads. OLTP powers day to day applications, lots of small reads and writes, strict ACID guarantees, low latency, and highly normalized schemas. OLAP is for analytics, fewer but much heavier queries, large scans and aggregations, denormalized or dimensional models, and systems optimized for read throughput.

That changes data engineering choices a lot: - For OLTP, you design for correctness and concurrency, indexes, transactions, and minimal write amplification. - For OLAP, you design for query performance, partitioning, columnar storage, compression, and star schemas. - You usually do not run analytics directly on OLTP, it can hurt app performance. - So engineers build ETL or ELT pipelines, replicate data into a warehouse or lakehouse, and model it differently. - Refresh cadence matters too, OLTP is real time, OLAP is often batch or micro batch, depending on business needs.

14. How have you handled schema evolution in pipelines consuming data from APIs, event streams, or source databases?

I handle schema evolution with a mix of contract management, defensive ingestion, and controlled rollout. The goal is to avoid breaking downstream consumers while still capturing new fields quickly.

  • I separate raw ingestion from curated models, raw stores the payload as-is, curated applies versioned schemas.
  • For APIs and events, I use schema registries or JSON schema checks, and classify changes as backward compatible or breaking.
  • I make parsers tolerant to additive changes, like new nullable fields, but alert on type changes, removals, or semantic shifts.
  • In CDC or source DB pipelines, I track DDL changes, version transformations, and use migration playbooks for backfills.
  • I add data quality tests and monitor field-level null rates, cardinality, and parse failures after changes.

Example, when an event added nested attributes and changed one field from int to string, I landed both versions in bronze, updated silver with explicit casting logic, backfilled safely, and notified consumers before deprecating the old contract.

15. What strategies have you used to make ETL or ELT pipelines idempotent and recoverable?

I design for safe re-runs first, then recovery second. The core idea is that the same input should produce the same result, even if a job is retried halfway through.

  • Use stable business keys plus upserts, or MERGE, instead of blind inserts.
  • Add batch IDs, watermarks, and checkpoints so each run knows exactly what was processed.
  • Land raw data immutably in staging, then transform from that layer, never from partially written targets.
  • Write outputs atomically, like load to temp tables and swap, or use partition overwrite by date/window.
  • Track job state in a metadata table, including run status, row counts, hashes, and last successful offset.

One example, I had a Spark pipeline pulling from Kafka to S3 to Snowflake. We used offsets as checkpoints, deduped on event ID, and loaded through staging tables with MERGE. If a run failed, we restarted from the last committed offset without creating duplicates.

16. How do you design a pipeline to handle late-arriving, duplicated, or out-of-order events?

I’d design it around event-time processing, idempotency, and a raw-to-curated model so bad ordering does not corrupt downstream tables.

  • Ingest every event into an immutable raw layer with metadata like event_id, event_time, ingest_time, source, and sequence/version if available.
  • Deduplicate using a business key plus event_id, or a hash if no stable ID exists, and make writes idempotent with upserts or merge logic.
  • Handle out-of-order data using event time, not arrival time, plus watermarks and a lateness threshold, like 24 hours.
  • For mutable entities, keep the latest record by sequence number or event_time, and use window functions to rebuild state correctly.
  • Send very late or invalid events to a quarantine stream for replay or manual review.
  • Reprocessing matters, so keep raw data long enough to backfill curated tables when rules change.

17. What partitioning and clustering strategies have you used in large datasets, and how did you evaluate their effectiveness?

I usually start with access patterns, not the data shape alone. Partitioning is for pruning big chunks, clustering is for speeding up reads within those chunks.

  • I’ve partitioned by event date, ingestion date, and sometimes tenant or region when queries were strongly scoped.
  • I use clustering on high-cardinality filter or join columns like customer_id, order_id, or device_id.
  • I avoid over-partitioning, because tiny partitions create metadata overhead and hurt performance.
  • For late-arriving data, I’ve used ingestion-time partitions plus backfills into event-date tables when needed.
  • In skewed datasets, I’ve checked partition sizes and sometimes added bucketing or hash-based distribution.

To evaluate, I compare before and after on query latency, bytes scanned, shuffle volume, slot or compute usage, and cost. I also review partition hit ratios, clustering depth, and query plans. In one pipeline, repartitioning by date and clustering by account_id cut scan cost by about 60 percent and improved dashboard latency a lot.

18. How do you decide between using SQL-based transformations and a distributed processing framework like Spark or Flink?

I decide based on scale, complexity, latency, and where the data already lives.

  • Use SQL when transformations are mostly joins, filters, aggregations, window functions, and the warehouse can handle the volume well.
  • Use Spark when data is very large, logic is iterative or custom, or I need batch pipelines across files, lakes, and multiple sources.
  • Use Flink when I need true stream processing, low latency, event time semantics, or complex stateful operations.
  • I also look at team productivity, SQL is faster to build and easier to maintain for many analytics workflows.
  • Cost matters too, pushing work into an existing warehouse can be cheaper, but at big scale Spark may be more efficient.

My rule of thumb, start with SQL for simplicity, move to Spark or Flink only when performance, streaming needs, or logic complexity justify it.

19. What are the tradeoffs between normalized and denormalized data models in analytical systems?

In analytics, the choice is mostly between write efficiency and query simplicity.

  • Normalized models reduce redundancy, improve data quality, and make updates safer because each fact lives in one place.
  • They are harder for analysts to use, often require more joins, and can slow large read-heavy workloads.
  • Denormalized models are faster and simpler for BI tools, since common dimensions and metrics are already flattened together.
  • The downside is duplicated data, bigger storage, and more risk of inconsistency if pipelines do not update every copy correctly.
  • In practice, teams often normalize in the raw or core layer, then denormalize into star schemas, marts, or wide tables for consumption.

So I usually say, normalize for maintainability, denormalize for performance and usability.

20. How do you approach building and maintaining data contracts between producers and consumers?

I treat data contracts like product APIs, explicit, versioned, and jointly owned by producers and consumers. The goal is to reduce surprise, not just document schemas.

  • Start with the interface: fields, types, nullability, semantics, SLAs, freshness, lineage, and allowed breaking changes.
  • Get both sides aligned early, usually with examples of valid and invalid records, not just a schema file.
  • Enforce contracts in CI/CD with schema checks, compatibility tests, and sample data validation before deployment.
  • Version changes clearly, prefer additive changes, and use deprecation windows for breaking updates.
  • Monitor in production with freshness, volume, schema drift, and quality checks, then alert on violations.
  • Keep ownership clear: producer owns correctness and change communication, consumer owns usage assumptions and feedback.

In practice, I’ve used tools like Avro or JSON Schema plus registry-based validation, then paired that with observability so contracts stay alive after launch.

21. Explain your experience with dimensional modeling. When would you choose a star schema versus a snowflake schema?

I’ve used dimensional modeling a lot in analytics warehouses, mostly to make reporting fast, intuitive, and stable for business users. My usual approach is to identify the business process, define the grain first, then model facts and dimensions around that. I’ve built fact tables for orders, subscriptions, and product usage, with dimensions like customer, date, product, geography, and sales rep. I also use surrogate keys, slowly changing dimensions, and conformed dimensions when multiple marts need consistent reporting.

I choose a star schema most of the time because it’s simpler, faster for BI tools, and easier for analysts to query. I’d choose snowflake when dimension hierarchies are large, highly normalized, and reused, like product category or geographic rollups, where reducing redundancy matters more than query simplicity. In practice, I prefer star unless storage governance or strict normalization gives a clear benefit.

22. What are slowly changing dimensions, and how have you implemented different types in practice?

Slowly changing dimensions are ways to handle attribute changes in dimension tables over time, so analytics stay accurate. The main tradeoff is between preserving history and keeping the model simple.

  • Type 1 overwrites old values, no history. I’ve used it for typo fixes or non-analytical fields like corrected email formatting.
  • Type 2 preserves full history with a new row, surrogate key, effective_from, effective_to, and is_current. I’ve implemented this for customer address, sales territory, and pricing band changes.
  • Type 3 keeps limited history, usually current and previous value. I’ve used it rarely, mostly for reporting on prior vs current region.
  • In practice, I build Type 2 with hash-based change detection in ETL, expire the old row, insert the new one, and ensure facts join to the correct surrogate key based on event date.
  • I also add data quality checks to prevent overlapping date ranges and duplicate current records.

23. How do you optimize SQL queries that process very large tables?

I start by finding where time is actually spent, then I reduce data scanned, improve access paths, and fix expensive operators.

  • Check the execution plan first, look for full table scans, bad join order, spills, and skew.
  • Filter early, project only needed columns, and avoid SELECT *.
  • Add or tune indexes based on predicates, joins, and sort keys, especially composite indexes in the right column order.
  • Partition large tables by date or another common filter, so queries prune partitions instead of scanning everything.
  • Rewrite costly logic, for example replace correlated subqueries with joins, pre-aggregate before joins, and use EXISTS instead of IN when appropriate.
  • For analytics, use clustered storage, columnar formats, and materialized views or summary tables.
  • Validate stats are fresh, because stale statistics often cause poor plans.
  • If data is huge, parallelize carefully and watch for shuffle, temp space, and memory pressure.

24. Describe a situation where poor query performance affected a business process. What did you do to fix it?

I’d answer this with a quick STAR structure, situation, impact, action, result, and keep it focused on business outcome.

At one company, our finance team had a month end reconciliation job that used a large fact table and several unoptimized joins. The query started taking over 2 hours, which delayed reporting and pushed back executive reviews. I dug into the execution plan and found full table scans, a skewed join key, and repeated scans from nested subqueries.

I fixed it by partitioning the largest table by date, adding a couple of targeted indexes, and rewriting the query into staged transformations in temp tables so we could filter earlier. I also updated stats and validated the new plan. Runtime dropped to about 12 minutes, and finance got their reports on time consistently.

25. What metadata do you believe every production dataset should expose to support governance and observability?

I’d expose metadata in a few layers so people can trust, find, and operate the dataset without tribal knowledge.

  • Business metadata: clear description, owner, steward, domain, use cases, and known limitations.
  • Technical metadata: schema, data types, partitions, file format, update cadence, retention, and upstream/downstream lineage.
  • Governance metadata: sensitivity classification, PII fields, legal basis, access policy, consent or usage restrictions, and audit history.
  • Quality metadata: freshness SLA, completeness, null rates, uniqueness, distribution checks, incident history, and last validation status.
  • Operational metadata: run IDs, load timestamps, source extract window, record counts, job version, and environment.
  • Discoverability metadata: tags, glossary terms, sample queries, dashboard links, and contact channel.

If I had to prioritize, I’d start with owner, lineage, sensitivity, freshness, and quality status.

26. How do you design for data lineage, and why has it mattered in your past work?

I design lineage as part of the platform, not as an afterthought. At minimum, I want lineage at three levels, table, column, and job level, so I can answer where data came from, how it was transformed, and what breaks if something changes.

  • I capture metadata from orchestration, SQL parsing, and catalog tools, then push it into a central catalog like DataHub or OpenMetadata.
  • I standardize naming, ownership, and schema contracts, because lineage is only useful if people trust the metadata.
  • I tie lineage to CI/CD, so schema changes trigger impact analysis before deployment.
  • I also expose it to analysts and stakeholders, not just engineers, through searchable docs and dashboards.

In one role, lineage helped us catch a breaking upstream change before it hit finance reporting. It also cut incident triage time a lot, because we could trace failures to the exact upstream model quickly.

27. Tell me about a time you worked closely with analysts, data scientists, or software engineers to clarify ambiguous data requirements.

I’d answer this with a quick STAR structure, focus on how I reduced ambiguity, aligned stakeholders, and turned vague asks into something testable.

At my last company, analysts wanted a “trusted customer activity dataset,” but everyone meant something different by “active,” “customer,” and even the reporting grain. I pulled together a short working session with analysts, a data scientist, and a backend engineer, and we mapped the metric definitions, source systems, edge cases, and expected consumers. I wrote a lightweight spec with sample records, transformation rules, and data quality checks, then built a prototype table for validation. That surfaced issues like late arriving events and duplicate identifiers early. We aligned on definitions, productionized the pipeline, and cut metric disputes significantly because everyone had signed off on the same logic.

28. How do you prioritize pipeline reliability versus delivery speed when product teams are under pressure?

I treat reliability and speed as a risk tradeoff, not a binary choice. The key is to protect the critical path while still giving product teams a fast lane for lower risk changes.

  • Tier pipelines by business impact, revenue or customer facing gets stricter SLAs, tests, and rollback plans.
  • Define release guardrails, schema checks, data quality tests, lineage, and alerting are non-negotiable for production.
  • Use progressive delivery, ship fast to dev or canary datasets first, then promote once metrics look clean.
  • Negotiate with product using impact language, “We can launch by Friday if we reduce scope, but not if we skip validation.”
  • Reserve reliability work as planned capacity, otherwise tech debt quietly becomes recurring incidents.

In practice, I’ve sped up delivery by standardizing templates and CI checks, so teams moved faster without bypassing controls.

29. Describe your experience with orchestration tools. How do you structure dependencies, retries, alerting, and backfills?

I’ve mainly used Airflow, plus some Prefect and managed schedulers like AWS Step Functions. My approach is to keep orchestration focused on coordination, not business logic, so tasks stay idempotent, observable, and easy to rerun.

  • Dependencies: model DAGs by data contract and SLA, use task groups and sensors sparingly, prefer event driven triggers over long polling.
  • Retries: classify failures, retry transient issues like network or rate limits with exponential backoff, fail fast on data quality or schema errors.
  • Alerting: alert on business impact, not every task blip, send PagerDuty for SLA misses or pipeline failures, Slack for warnings, include run metadata and likely cause.
  • Backfills: make jobs partition aware, parameterize by date or watermark, disable side effects when rerunning, and cap concurrency to protect downstream systems.
  • In practice: I built Airflow DAGs for daily ingestion and dbt transforms, with dataset based dependencies, custom retry policies, and safe historical reprocessing by partition.

30. What are the most important operational metrics for monitoring data pipelines?

I’d group pipeline metrics into reliability, freshness, quality, and cost. The key is to monitor both system health and business impact, not just whether a job finished.

  • Success and failure rate, percentage of runs that complete without errors.
  • End to end latency, how long data takes from source arrival to being query-ready.
  • SLA adherence, whether critical datasets land on time.
  • Data freshness, age of the latest successful record or partition.
  • Throughput and volume, rows, files, or bytes processed versus normal baseline.
  • Data quality signals, null spikes, schema drift, duplicates, referential integrity issues.
  • Retry, backfill, and incident counts, good indicators of operational pain.
  • Resource usage and cost, compute time, memory, storage, and cost per pipeline run.
  • Downstream impact, dashboard failures, broken dependencies, or user-facing delays.

If I were setting this up, I’d prioritize freshness, SLA misses, failure rate, and data quality alerts first.

31. How do you investigate and respond to a failed workflow that partially completed and wrote inconsistent outputs?

I treat this as both an incident response and a data repair problem. First I stop the blast radius, then I figure out exactly what succeeded, what failed, and whether the workflow is safe to replay.

  • Pause downstream jobs and alert stakeholders, so bad data does not spread further.
  • Check orchestration logs, task states, retries, input versions, and timestamps to build a timeline.
  • Compare expected outputs vs actual outputs, usually with row counts, checksums, partition-level validation, and business sanity checks.
  • Identify the write pattern, append, overwrite, upsert, and whether writes were atomic or idempotent.
  • Repair by rolling back bad partitions if possible, or deleting partial outputs and rerunning only the affected scope from a known good checkpoint.

In a solid design, I prevent this with idempotent jobs, transactional writes like Delta/Iceberg, audit tables, and data quality gates before publish.

32. What strategies do you use for backfilling historical data without disrupting current production workloads?

I treat backfills like a separate product path, not just a big replay job. The goal is to protect SLAs first, then recover history in controlled slices.

  • Isolate compute, use separate clusters, queues, or warehouse resource groups so production keeps priority.
  • Backfill in partitions, by date, tenant, or key range, with checkpoints for restartability.
  • Throttle aggressively, cap concurrency, batch size, and I/O so you do not overwhelm source systems.
  • Read from snapshots or replicas when possible, not live OLTP primaries.
  • Make writes idempotent, use merge/upsert logic and deterministic transforms to avoid duplicates.
  • Validate each slice, row counts, checksums, and business metrics before promoting.
  • Roll out incrementally, start with a small window, monitor, then widen.

In practice, I’ve run large backfills overnight with Airflow, using partitioned jobs plus warehouse workload management, and only promoted data after automated reconciliation passed.

33. Describe how you have used infrastructure as code, CI/CD, or automated deployment practices in data engineering.

I usually answer this by tying automation to reliability, speed, and repeatability, then giving one concrete pipeline example.

  • I have used Terraform to provision cloud data infrastructure, things like S3 buckets, IAM roles, Redshift or Snowflake resources, and Airflow environments, so environments were versioned and reproducible.
  • For CI/CD, I set up GitHub Actions and Jenkins pipelines to run SQL linting, unit tests on dbt models, Python tests for ETL code, and schema checks before merges.
  • On deployment, merges to main triggered automated promotion to dev, then staging, then prod with approval gates for higher-risk changes.
  • I also used Docker to standardize Spark and ETL runtimes, which reduced environment drift and made rollback easier.
  • In one project, this cut release time from hours to about 20 minutes and reduced failed deployments because bad schema changes were caught early.

34. How do you manage secrets, credentials, and access control in data platforms?

I treat it as three layers, secret storage, identity, and authorization.

  • Store secrets in a vault like AWS Secrets Manager, Azure Key Vault, or HashiCorp Vault, never in code, notebooks, or CI variables.
  • Prefer short lived credentials and workload identities over long lived keys, for example IAM roles, service principals, or Kubernetes IRSA.
  • Enforce least privilege with RBAC and, where possible, ABAC, scoped per environment, dataset, and job.
  • Rotate secrets automatically, audit every access, and alert on unusual usage or failed auth patterns.
  • Separate human access from machine access, use SSO plus MFA for users, and managed identities for pipelines.

In practice, I also isolate dev, test, and prod, use break-glass accounts with tight monitoring, and review permissions regularly through access recertification.

35. If a business stakeholder says the dashboard numbers do not match finance’s numbers, how would you investigate and resolve the discrepancy?

I’d treat it like a data reconciliation problem and align on definitions before touching SQL. Most mismatches come from metric logic, grain, filters, timing, or source-of-truth differences.

  • First, clarify exactly which number is off, by how much, for what date range, entity, and report cut.
  • Align definitions, ask how finance calculates it, cash vs accrual, gross vs net, booked vs recognized revenue.
  • Compare source systems, dashboard table, finance extract, and transformation logic step by step to find where values diverge.
  • Check common issues, timezone, late-arriving data, duplicates, joins inflating rows, missing filters, currency conversion, and fiscal calendar logic.
  • Reproduce both numbers with small controlled queries and document the variance clearly.

If the dashboard is wrong, I’d fix the pipeline and backfill. If definitions differ, I’d standardize the metric with finance and publish a shared definition so it doesn’t happen again.

36. How do you decide what belongs in a semantic layer versus raw or curated tables?

I decide based on audience, stability, and business meaning. Raw tables are for ingestion fidelity, curated tables are for cleaned and conformed data, and the semantic layer is for business-ready definitions people should use consistently.

  • Raw: keep source-shaped data, minimal transforms, full lineage, auditability.
  • Curated: apply quality checks, dedupe, standardize keys, model entities and facts.
  • Semantic layer: put shared metrics, dimensions, hierarchies, filters, and access rules.
  • If logic is reused across teams and needs one trusted definition, it belongs in semantic.
  • If logic is heavy data prep or joins needed for performance, it usually belongs in curated.
  • If it is experimental, source-specific, or likely to change often, keep it out of semantic.

My rule of thumb: semantic layers should answer “how the business measures things,” not “how the data is physically prepared.”

37. How do you test data pipelines at the unit, integration, and end-to-end levels?

I test pipelines in layers, because each level catches different failures and keeps debugging fast.

  • Unit tests validate pure logic, transforms, schema mapping, null handling, deduping, and edge cases with small deterministic fixtures.
  • I isolate external systems with mocks or stubs, so I can test functions like parsing, enrichment, and partition logic without Spark, warehouses, or APIs.
  • Integration tests run against real components, like Spark plus S3, Kafka, or a test warehouse, to verify contracts, schema evolution, idempotency, and write behavior.
  • End-to-end tests execute the full pipeline in a lower environment using representative data, then assert row counts, reconciliations, business rules, and downstream availability.
  • I also add data quality checks, freshness checks, and observability, using tools like Great Expectations, dbt tests, or custom assertions in CI/CD.

38. What is your approach to enforcing least privilege while keeping data teams productive?

I treat least privilege as a product design problem, not just a security rule. The goal is to make the secure path the easiest path.

  • Start with role-based access, aligned to job functions like analyst, DE, ML engineer, then layer ABAC for sensitivity, environment, and geography.
  • Default to read-only and scoped access, with separate paths for prod vs non-prod, and PII vs non-PII.
  • Use groups, not direct user grants, and provision through IAM or IdP so access is auditable and easy to revoke.
  • Give teams self-service access requests with approvals, time-bound elevation, and automatic expiry for break-glass cases.
  • Standardize data domains, naming, and tagging so policies can be applied consistently across warehouses, lakes, and BI tools.
  • Review access regularly, based on usage logs and owner attestations, to remove stale privileges without blocking active work.

39. How have you implemented PII handling, masking, retention, or deletion requirements in a pipeline?

I handle PII with a mix of classification, minimization, and enforceable controls across the pipeline.

  • First, I tag sensitive columns in the schema or catalog, things like email, SSN, phone, and drive rules off that metadata.
  • For masking, I use role-based views or dynamic masking so analysts see hashed or partially masked values, while restricted services can access cleartext when justified.
  • In ingestion, I separate raw and curated zones, encrypt at rest and in transit, and avoid copying PII into logs, temp tables, or debug outputs.
  • For retention and deletion, I implement TTL policies plus subject-delete workflows keyed by customer ID, then propagate deletes through downstream tables and snapshots.
  • In one pipeline, we used SCD tables plus delete manifests, audited every erase request, and validated with reconciliation queries so deleted records were gone everywhere required.

40. Tell me about a time compliance, security, or governance requirements significantly changed your technical design.

I’d answer this with a tight STAR story, focusing on the requirement, the design tradeoff, and the measurable outcome.

At a fintech company, we were building a customer analytics pipeline in the cloud, and late in design, compliance required stricter PII controls for GDPR and SOC 2. Originally, we planned a fairly open bronze-silver-gold model, but I changed the design so raw PII stayed in a locked landing zone, with tokenization before downstream processing. I added column-level access controls, separate encryption keys, tighter retention policies, and full audit logging on sensitive tables. That increased complexity and added some latency, but it let analysts use safe datasets without touching raw identifiers. We passed the compliance review on schedule, reduced access approvals dramatically, and avoided a redesign later when the product expanded into new regions.

41. How do you evaluate and control cost in cloud-based data platforms?

I treat cloud cost like a data quality metric, measure it continuously, tie it to business value, and put guardrails in place early.

  • Start with visibility: tagging by team, product, environment, and pipeline, then build dashboards for compute, storage, egress, and orchestration costs.
  • Define unit economics: cost per TB processed, per pipeline run, per dashboard, or per customer report, so spend has context.
  • Optimize the big levers first: right-size clusters, use autoscaling, turn off idle resources, pick the right storage tier, and reduce data scans with partitioning and pruning.
  • Control growth with governance: budgets, alerts, quotas, approval workflows, and chargeback or showback.
  • Review regularly: FinOps-style weekly reviews with engineering and business teams, then track savings from changes like compaction, workload scheduling, or reserved capacity.

42. Explain how you would design a multi-tenant data platform with isolation, scalability, and governance in mind.

I’d design it with clear tenant boundaries at the storage, compute, and metadata layers, then choose the isolation model based on risk and cost.

  • Isolation: use a tiered model, shared platform with logical isolation for most tenants, dedicated compute or accounts for regulated or high-volume tenants.
  • Storage: partition by tenant, encrypt per tenant with separate keys if needed, and enforce row or schema level access through IAM plus policy tags.
  • Compute: separate ingestion and serving, use autoscaling workers, workload queues, and resource quotas to stop noisy-neighbor issues.
  • Governance: central catalog, lineage, data classification, audit logs, retention policies, and contract-driven schemas.
  • Scalability: event-driven ingestion, lakehouse storage, medallion layers, and metadata-driven pipelines for onboarding new tenants fast.

I’d also standardize observability, SLA tracking, and tenant-level cost attribution so operations and chargeback stay manageable.

43. What are the tradeoffs between storing raw data as-is versus applying transformations before landing it?

I’d frame it as flexibility versus early standardization.

  • Raw-as-is preserves fidelity, supports reprocessing, audits, and new use cases later.
  • It also lands faster, especially with semi-structured data, but pushes complexity downstream.
  • Transform-before-landing gives cleaner, query-ready data early, with consistent schemas and better consumer experience.
  • The downside is you can lose source detail, bake in wrong assumptions, and make backfills harder.
  • It can also slow ingestion if transformations are heavy or source schemas drift often.

In practice, I prefer keeping a raw immutable zone, then creating curated layers on top. That gives you lineage, replayability, and governance, while still serving business-friendly data quickly. The right choice depends on latency needs, storage cost, compliance, and how often business logic changes.

44. How do you decide whether transformations should happen during ingestion, in staging, or in downstream modeling layers?

I decide based on blast radius, reusability, and how much business logic is involved.

  • In ingestion, I only do minimal, safe transforms: schema alignment, type casting, dedup keys, partitioning, and basic PII handling.
  • In staging, I standardize raw data into clean, consistent entities. This is where I fix source quirks, normalize formats, and apply reusable rules.
  • In downstream modeling, I put business logic, joins across domains, KPIs, and aggregations tied to specific consumers or analytics use cases.
  • If a transform is irreversible or opinionated, I avoid doing it too early unless there is a strong compliance or cost reason.
  • I also ask, who owns this logic, how often will it change, and do multiple teams need the raw version?

A good rule is: preserve raw, clean in staging, and curate in marts.

45. How have you handled versioning of datasets, schemas, and transformation logic over time?

I treat versioning at three layers, data, schema, and code, and I make each one explicit so changes are traceable and reversible.

  • Transformation logic lives in Git with PR reviews, tagged releases, and CI tests for data quality and backward compatibility.
  • Schema changes are managed through migrations and a schema registry or contract docs, with version numbers, deprecation windows, and clear ownership.
  • For datasets, I prefer immutable, partitioned tables plus snapshot or time travel support in Delta, Iceberg, or Hudi, so consumers can reproduce past outputs.
  • I separate breaking vs non-breaking changes, for example adding a nullable column is fine, renaming or changing types usually requires a new versioned table or view.
  • In one pipeline, we moved from orders_v1 to orders_v2, dual-published for two weeks, validated row counts and key metrics, then cut consumers over cleanly.

46. Describe a difficult incident where upstream systems changed unexpectedly. How did you minimize downtime and communicate impact?

I’d answer this with a quick STAR structure: situation, what broke, the containment steps, then stakeholder communication and the longer-term fix.

At a previous role, an upstream API changed a field from string to nested JSON without notice, which broke our ingestion job and downstream dashboards. I first paused the failing load to stop bad data propagation, then routed the pipeline to the last known good partition so reporting stayed partially available. In parallel, I added a temporary schema handling layer to parse both formats and backfilled the missed window once stable. For communication, I posted an incident update immediately in Slack and the status page, with impacted datasets, business risk, ETA, and workaround. Afterward, I set up schema drift alerts, contract checks, and a change notification process with that upstream team.

47. What does “data observability” mean to you, and how have you implemented it in practice?

To me, data observability is the ability to see the health of data systems end to end, not just whether pipelines ran, but whether the data is fresh, complete, accurate, and usable. It is basically applying monitoring to data itself, with enough context to detect issues early and explain impact fast.

  • I usually track freshness, volume, schema drift, null rates, duplicates, and distribution changes on critical tables.
  • In practice, I have implemented this with dbt tests, Airflow alerts, warehouse queries for anomaly checks, and lineage to trace downstream impact.
  • On one team, we set SLAs for key datasets, built automated checks after each load, and pushed failures to Slack and PagerDuty.
  • We also created data quality dashboards and tagged high priority assets, so incidents were triaged by business impact.
  • That reduced silent data failures and cut time to detect and resolve issues significantly.

48. How would you design a near-real-time dashboard pipeline where freshness and correctness are both critical?

I’d design it as a streaming-first pipeline with explicit correctness controls, because “fast” and “right” usually fight each other.

  • Ingest events through Kafka or Kinesis, partitioned by a stable business key, with schema validation at the edge.
  • Process with Flink or Spark Structured Streaming, using event time, watermarks, deduplication keys, and idempotent writes.
  • Maintain two layers: a hot serving layer for sub-minute dashboard aggregates, and a durable raw plus curated lakehouse layer for replay and backfills.
  • Store dashboard-ready aggregates in something like Pinot, Druid, or ClickHouse for low-latency queries.
  • Handle late and corrected data with upserts and periodic reconciliation jobs against source-of-truth tables.

For reliability, I’d add data quality checks, lag and freshness SLAs, dead-letter queues, lineage, and versioned schemas. If correctness is truly critical, I’d expose freshness timestamps and data completeness indicators directly on the dashboard.

49. How have you mentored junior engineers or influenced standards for coding, reviews, documentation, and pipeline design?

I usually mentor with a mix of hands-on pairing, clear standards, and lightweight feedback loops. The goal is to help junior engineers ship confidently, not just follow rules.

  • I pair on real tickets, especially around SQL design, Spark jobs, and debugging failed pipelines, so they learn decision-making in context.
  • For code reviews, I push for consistency: naming, test coverage, idempotent jobs, partition strategy, and clear rollback plans. I explain the why, not just request changes.
  • I’ve written templates for design docs and PRs, so engineers document assumptions, data contracts, SLAs, and failure modes before building.
  • On pipeline design, I advocate standards like modular transforms, schema validation, observability, and avoiding hidden business logic in orchestration layers.
  • I also run short knowledge shares and give juniors ownership of small systems, with guardrails, so they build confidence fast.

50. Describe the best data engineering system you have worked on. What made it successful, and what would you still improve?

I’d frame this as architecture, business impact, and honest tradeoffs.

One of the best systems I worked on was a near real-time customer event platform. We ingested clickstream, app, and transaction data through Kafka, processed it with Spark Structured Streaming, and landed curated datasets in Snowflake for analytics and activation. What made it successful was reliability and trust, not just scale. We had clear contracts, data quality checks, lineage, and strong observability, so downstream teams actually used it.

A few things helped a lot: - We designed for idempotency and replay, which made incidents much easier to recover from. - We separated raw, refined, and serving layers, so changes were safer. - We aligned SLAs with business needs, not engineering vanity metrics. - We treated documentation and ownership as part of the platform.

What I’d improve is cost efficiency and self-service. We could have added better workload isolation, smarter storage lifecycle policies, and easier onboarding for new producers.

51. What do you do in the first 30, 60, and 90 days when joining a team that owns critical production data pipelines?

I’d structure it as learn, stabilize, then improve.

  • First 30 days, understand the business, pipeline architecture, SLAs, lineage, on-call pain points, and failure history. I’d review runbooks, dashboards, alerts, code, and recent incidents.
  • By 60 days, I’d start owning low-risk changes, improve observability, close obvious reliability gaps, and document tribal knowledge. I’d also build relationships with stakeholders and upstream/downstream teams.
  • By 90 days, I’d be fully in the rotation, propose a roadmap, and drive 1 to 2 meaningful improvements like backfill automation, data quality checks, cost optimization, or better deployment patterns.
  • Throughout, I’d avoid rushing big rewrites. On critical pipelines, earning trust means making safe, measurable improvements first.

Get Interview Coaching from Data Engineering Experts

Knowing the questions is just the start. Work with experienced professionals who can help you perfect your answers, improve your presentation, and boost your confidence.

Complete your Data Engineering interview preparation

Comprehensive support to help you succeed at every stage of your interview journey

Still not convinced? Don't just take our word for it

We've already delivered 1-on-1 mentorship to thousands of students, professionals, managers and executives. Even better, they've left an average rating of 4.9 out of 5 for our mentors.

Find Data Engineering Interview Coaches