Data engineer interview questions and how to answer them

Data engineer interviews focus on building pipelines that are correct, repeatable and affordable: advanced SQL, data modeling for a warehouse, batch and streaming design, orchestration, and data quality. Coding rounds usually use SQL and Python on realistic data problems. The question behind most of the others is what happens when a job fails halfway or runs twice, so know how to make a pipeline idempotent.

By Published 5 min read

Interview structure

  1. ScreenYour pipelines so far: sources, volume, tools, and the hardest failure you dealt with.
  2. SQL roundTwo or three queries on event or transaction data, often with a twist such as duplicates or gaps.
  3. Python roundTransform records, parse files, or implement part of a pipeline with tests.
  4. Data modelingDesign the warehouse tables for a business such as a ride service or an online shop.
  5. Pipeline designA system design round for data: from source systems to tables analysts can query.

SQL questions at data engineer level

SQL problems common in data engineering interviews
ProblemTechniqueDetail to mention
Keep the latest record per key from a table with duplicates.ROW_NUMBER over a partition, ordered by update timeThe tie-breaker when two rows share a timestamp
Group page views into sessions with a 30-minute gap.LAG to find gaps, then a running sum to number sessionsWhy the gap length is a business choice
Find gaps in a sequence of daily loads.Compare each date with the previous one, or join to a calendar tableCalendar tables make missing days visible
Merge new and changed rows into a target table.MERGE or an upsertRunning it twice must give the same result
Compute a running total per account.SUM as a window function with an ORDER BYThe default window frame and how it treats ties
A join is slow on two large tables.Check partition pruning, join keys, skew and the query planOne hot key can put most rows on one worker
SQL problems common in data engineering interviews. Scroll sideways on a small screen.

Data modeling questions

  • What is the grain of a fact table? What one row represents, such as one order line or one ride. Decide it first. Most modeling mistakes are grain mistakes.
  • Star schema versus snowflake schema? A star keeps dimensions flat and queries simple. A snowflake normalizes dimensions, saving storage and adding joins.
  • What is a slowly changing dimension? A way to keep history when an attribute changes. Type 1 overwrites the value. Type 2 adds a new row with validity dates, so past facts still join to the value that was true then.
  • Normalize or denormalize? Normalize in transactional systems to protect writes. Denormalize in analytical systems to make reads fast and simple.
  • How would you model orders, customers and products for analytics? A fact table of order lines with keys to customer, product and date dimensions, plus measures such as quantity and amount. State the grain before drawing anything.
  • What are surrogate keys for? Stable identifiers owned by the warehouse, independent of source system keys that may change or collide.

Pipeline and ETL questions

Pipeline design questions
QuestionWhat a good answer covers
How do you make a pipeline idempotent?Overwrite a whole partition, or merge on a key. Never blindly append on a rerun
ETL versus ELT?Transform before loading, or load raw data and transform inside the warehouse. ELT keeps raw data available for reprocessing
How do you run a backfill?Parameterize jobs by date, run partitions in parallel within limits, and validate counts against the source
How do you load only what changed?A high-water mark on an updated-at column, or change data capture from the database log. The first misses hard deletes
A source adds a column or changes a type. What happens?Detect it with schema checks, decide whether to fail or evolve, and tell the consumers
How do you partition a large table?By the column most queries filter on, usually a date. Too many small partitions slow things down
Row or columnar file formats?Columnar formats such as Parquet compress well and read only needed columns, which suits analytics
Pipeline design questions. Scroll sideways on a small screen.

Streaming questions

  • Batch or streaming? Ask what freshness the business needs. Hourly batch is far simpler to run than streaming, and it is often enough.
  • How does a log-based message system such as Kafka keep order? Order is kept within a partition. Records with the same key go to the same partition.
  • At-least-once versus exactly-once? At-least-once can deliver duplicates after a failure, so the consumer must deduplicate or write idempotently. Exactly-once needs coordination between the processor and the sink and has limits.
  • Event time versus processing time? When something happened versus when you saw it. Aggregations by event time need a rule for late records, such as a watermark and an allowed lateness.
  • What is consumer lag, and what do you do about it? The distance between the newest record and what the consumer has processed. Scale consumers, fix slow processing, or add partitions.

Orchestration and data quality

  • What does an orchestrator do? It schedules tasks, tracks dependencies, retries failures and shows status. Describe a workflow you built as a graph of tasks.
  • A task failed at 3 a.m. What should happen? Automatic retries with a delay, an alert if they are exhausted, downstream tasks held back, and a rerun that is safe because the task is idempotent.
  • Which data quality checks do you add? Row counts against the source, uniqueness of keys, not-null on required fields, accepted ranges and values, and freshness.
  • How do you stop bad data from reaching dashboards? Validate in a staging area and publish only if checks pass.
  • What is data lineage for? Knowing which tables and reports depend on a source, so you can assess the impact of a change or an incident.

The pipeline design round

A typical prompt: "Design a pipeline that brings clickstream events and the orders database into a warehouse for daily revenue reporting." Work through it in a fixed order.

  1. RequirementsVolume per day, freshness needed, who queries the result, and how long data is kept.
  2. IngestionEvents through a message system into object storage. Database tables through change data capture or scheduled extracts.
  3. Storage layersRaw data kept as received, cleaned data with types and deduplication, and modeled tables for reporting.
  4. TransformationScheduled jobs partitioned by date, written so a rerun replaces the partition.
  5. Quality and monitoringChecks between layers, alerts on failures and freshness, and a documented backfill procedure.
  6. CostPartitioning, file sizes, retention rules and compute that scales down when idle.

Python questions

Tasks are practical: read a large file without loading it all into memory, flatten nested JSON, deduplicate records by key keeping the newest, or call a paginated API with retries. Use generators for large inputs, handle bad records explicitly, and write a small test. Interviewers also ask how you would test a transformation, so be ready to describe fixtures with known input and expected output.

Getting ready

Prepare one pipeline story in detail: its sources, volume, schedule, the failure that taught you the most, and what you changed. Draw it from memory. For the design round, practice saying requirements and trade-offs aloud, since silence while drawing reads as uncertainty. If you rehearse with Natively, an AI interview assistant, the mock session is transcribed on your Mac or Windows computer, which makes it easy to see where your explanation jumped a step.

Questions people ask

What questions are asked in a data engineer interview?

Advanced SQL such as deduplication and sessionization, warehouse data modeling, pipeline design including idempotency and backfills, streaming concepts, orchestration, data quality, and Python tasks.

What is an idempotent pipeline?

A pipeline that gives the same result whether it runs once or several times for the same period. It is usually achieved by overwriting a partition or merging on a key instead of appending.

How do I approach a data pipeline design question?

Ask for volume, freshness and consumers first. Then cover ingestion, raw, cleaned and modeled storage layers, transformation, quality checks, monitoring and cost.

What data modeling topics should I know?

Fact and dimension tables, grain, star and snowflake schemas, slowly changing dimensions, surrogate keys, and when to denormalize for analytics.

Where to go next

Practice with the same assistant you would use on a call: it listens, transcribes and suggests answers from your own resume and the job description.

Facts on this page were last checked on . Product details come from the Natively app itself; if something here is out of date, tell us at hello@heynatively.com.

Keep reading

Put it on your own machine.

A live-conversation assistant that runs locally. Your conversations stay on your machine.

macOS 12+ · Windows 10/11

© 2026 Natively AI Private Limited

Source-available under the Natively Personal Use Source License v1.0 · IP geolocation by DB-IP