Skip to content
Tech Interview Prep

Real Interview Questions for the Data Engineer at Amadeus

New

Interview Q&A

15 questions · Flow follows Relevance until this set has a learning order.

Q&A-1How do you optimize ETL pipelines for high-volume, low-latency environments?

Reported in Amadeus Data Engineer Interview Questions & Guide 2026

The 90-second answer

I split the pipeline into ingest, transform, and load, because the optimisation differs at each stage. For high volume and low latency I move from nightly batch to streaming or micro-batch, keep transforms incremental, and partition by the consumer's access pattern. For PNR updates, flight schedule changes, and booking events, that means processing events as they arrive instead of waiting for a daily dump.

The first levers are to avoid full scans and full shuffles, process only changed records, and size parallelism to the data rate. If a job reads 2 TB to update 20 GB, tuning workers will not fix the design.

Where latency actually goes

I profile in this order: shuffle volume, skewed keys, small files, and state growth. Shuffle dominates when you join on a high-cardinality key such as pnr_locator, or repartition by a low-cardinality field like departure_airport with only a few hundred distinct values. One airport can hold 8% of the day's records while others hold 0.1%, so a single reducer becomes the tail.

BottleneckSymptomFix I apply
Full refresh of a dimension90 min job, 95% rows unchangedCDC or merge on updated_at plus a hash of source columns
Shuffle on booking keyp99 stage time 10x medianPartition the larger input by the join key in the previous stage; broadcast the smaller input only after raising spark.sql.autoBroadcastJoinThreshold
Small files on load40k files of 2 MB, downstream scan slowCoalesce to 128 to 256 MB files and compact hourly
Late and out-of-order eventsDuplicates after replayWatermark on event_time, deduplicate on event_id, and upsert on event_id in the sink
Skewed airport keyOne task runs 20 min, rest idleSalt the key for aggregation, or split hot keys into separate branches

Streaming design

For PNR and order events I use Kafka as the buffer, Flink or Spark Structured Streaming for the transform, and a lakehouse table partitioned by event_date and departure_airport. The buffer absorbs bursts during peak booking windows, which in a hypothetical peak hour can be 5 to 10 times the daily average, without dropping records.

Python
# PySpark Structured Streaming, Spark 3.5 API
# Hypothetical figures: 50k events/min peak, 10 min watermark
raw = (
    spark.readStream.format("kafka")
    .option("kafka.bootstrap.servers", "kafka1:9092,kafka2:9092")
    .option("subscribe", "pnr.events")
    .load()
)

events = (
    raw.select(from_json(col("value"), schema).alias("e"))
    .select("e.*")
    .dropDuplicates(["event_id"])
    .withWatermark("event_time", "10 minutes")
)

query = (
    events.writeStream.format("delta")
    .option("checkpointLocation", "s3://lake/checkpoints/pnr")
    .outputMode("append")
    .trigger(processingTime="60 seconds")
    .start("s3://lake/bronze/pnr")
)

Deduplication on event_id runs before the watermark is set, so the state for deduplication is not tied to the watermark column. The watermark then bounds how late an event can arrive and still be included. Micro-batch at 60 seconds keeps end-to-end latency near 1 to 2 minutes in that setup. I choose the trigger from the consumer SLA, not from what the framework allows.

PNR and booking events Kafka topics by event type Streaming dedupe and validation Incremental enrichment joins Bronze Delta partitioned by date and airport Silver curated tables Serving: search, reporting, ML features

Batch where batch still wins

Historical schedule data, fare history, and reconciliation do not need streaming. I keep those on scheduled Spark batch with dynamic partition pruning and Z-ordering on filter columns, for example departure_airport and flight_date. A batch job that reads only the partitions it needs can finish in minutes even over petabytes, because the scan is bounded.

The failure mode I watch for is state growth in streaming joins. A join between PNR events and a passenger dimension that never expires will grow until checkpoint recovery takes longer than the job itself. I bound it with a TTL on the state store, expire records after 30 days, and reload the dimension from a snapshot on restart.

What I measure

I track end-to-end lag from event time to committed Delta file, records per second per partition, shuffle read in GB per job, and p99 task time. If lag rises while CPU is flat, the bottleneck is usually skew or a downstream sink throttling writes. I fix that by repartitioning the sink or splitting the hot partition, rather than adding workers.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-2Can you explain your experience with data quality assurance in automated workflows?

Reported in Amadeus Data Engineer Interview Questions & Guide 2026

The 90-second answer

In automated pipelines I treat data quality as a gate, not a report after the fact. Every workflow has explicit expectations on the input batch, the transformation, and the output table. If a check fails, the task fails, the bad rows go to quarantine, and downstream jobs do not run. That is how we stopped bad travel data reaching search and pricing.

At Amadeus scale the pattern matters more than the tool. A nightly feed can carry millions of PNR and flight records. One truncated file or one schema change can poison availability, fares, and reporting at once. So I define checks per dataset, version them with the pipeline, and alert on the check, not on a downstream dashboard looking wrong hours later.

How I structure it

pass fail Ingest batch Profile and validate Publish to curated table Quarantine bad rows Fail task and alert Downstream jobs

Checks fall into four groups. Completeness and freshness: did the file arrive, is the row count within tolerance of the previous run, is event_time current. Validity: codes, dates, and enums conform to the contract, for example airport IATA codes, currency codes, and departure after arrival. Uniqueness and referential integrity: no duplicate pnr_id plus segment, every flight_id resolves to a flight master row. Distribution: fare, passenger count, and cancellation rate stay inside observed bands, which catches silent truncation or a unit change from cents to dollars.

A concrete gate

This is the shape I use in an Airflow task, checked against Python 3.11. Thresholds below are from a hypothetical nightly PNR feed of 2.4 million rows.

Python
import pandas as pd

def validate_pnr_batch(df: pd.DataFrame) -> None:
    failures = []
    if len(df) < 2_300_000:  # expected 2.4m, allow 4% variance
        failures.append(f"row_count={len(df)}")
    dupes = df.duplicated(subset=["pnr_id", "segment_id"]).sum()
    if dupes:
        failures.append(f"duplicate_keys={dupes}")
    bad_dates = ((df["departure_ts"] <= df["arrival_ts"])).sum()
    if bad_dates:
        failures.append(f"bad_date_order={bad_dates}")
    null_fare = df["fare_amount"].isna().mean()
    if null_fare > 0.005:  # contract allows at most 0.5% missing fares
        failures.append(f"null_fare={null_fare:.3%}")
    if failures:
        df.to_parquet("s3://quarantine/pnr/2026-05-13.parquet")
        raise ValueError("; ".join(failures))

The same expectations also live as dbt tests on the curated model, so an ad hoc backfill gets checked even when it bypasses Airflow. One definition, two enforcement points.

Worked trace

RunRows inCheck that firesAction
------------
------------
------------
12 May2,412,008nonepublish, downstream runs
13 May1,180,442row_count below 2.3mquarantine, task fails, on-call paged
14 May2,398,771duplicate_keys=41,203quarantine, task fails, source team notified

The 13 May case was a partial file from the source. Publishing it would have halved that day's bookings in reporting and, worse, made availability look like a demand collapse. Failing fast cost us a rerun. Publishing would have cost a day of wrong decisions.

Failure modes I watch for

Late and out of order data: a file arrives six hours late with a full day's rows. Freshness checks pass on row count but the watermark is wrong, so I check max(event_time) against the batch window and reject batches that overlap a published partition without an explicit backfill flag.

Schema drift: a source adds a column or renames fare_amount to fare. Strict schema validation fails the batch, which is correct. The failure mode to avoid is a permissive reader that silently maps the new column to null and passes a null check that was written for a different reason. I pin the contract in version control and require a pipeline change, not a data fix, to accept a new schema.

Slow drift: values stay valid but shift, for example cancellation rate moving from 3% to 9% over a week. Hard thresholds miss this. I keep a 28 day rolling band on key distributions and alert on a sustained breach, then investigate with the source team before tightening the gate.

Tool choice is secondary. I have used Great Expectations and Soda for expectation suites and dbt tests for SQL level checks. What I would not do is rely on a single dashboard metric or on checks that only log warnings. A warning nobody acts on is how bad data reaches production.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-3What strategies do you use for data transformation and migration?

Reported in Amadeus Data Engineer Interview Questions & Guide 2026

The 90-second answer

I treat transformation and migration as separate problems. Transformation is making the data correct in the target model. Migration is moving it without losing records, duplicating them, or breaking consumers during cutover. I would not start either until I have profiled the source, written an explicit field mapping, and defined reconciliation checks I can run on every load.

For a typical Amadeus move, say legacy PNR and booking XML from a mainframe or file feed into a lakehouse table partitioned by travel date, I profile first: row counts per file, null rates on keys like record_locator, distinct values for status codes, and late-arriving files. That tells me whether a full reload is feasible or I need incremental CDC, and it exposes dirty codes I must map rather than pass through.

Then I build the transform as a deterministic, idempotent job. Same input partition in, same output partition out. I keep raw data untouched, apply typed transformations in a versioned layer, and publish only after validation passes. Migration runs in parallel with the old pipeline, I reconcile counts and checksums daily, and I cut over by flipping a view or table alias, not by rewriting consumers.

Transformation strategy

I use three layers. Raw lands as received, with source file name, load timestamp and a hash of the payload. A staging layer parses and types it, for example EDIFACT or XML segments into pnr_id, passenger_name, segment_airport, departure_ts. A curated layer applies business rules: airport code normalisation, timezone conversion to UTC, status code mapping, deduplication on the natural key.

The mapping is code, not a spreadsheet. Each rule has a test with a real example record. Schema changes are handled with additive evolution where possible. If a field changes meaning, I add a new column and backfill, rather than overwriting history that downstream revenue or reporting jobs already depend on.

Idempotency matters because retries are normal. A PySpark job for one partition looks like this:

Python
# PySpark 3.5, checked against Spark SQL merge semantics
from pyspark.sql import functions as F

raw = spark.read.table("raw.pnr_files").where(F.col("travel_date") == "2026-03-15")

curated = (
    raw.select(
        F.col("record_locator").alias("pnr_id"),
        F.upper(F.trim(F.col("passenger_name"))).alias("passenger_name"),
        F.to_utc_timestamp(F.col("departure_local"), "Europe/Madrid").alias("departure_utc"),
        F.when(F.col("status_code") == "HK", "CONFIRMED")
         .when(F.col("status_code") == "HX", "CANCELLED")
         .otherwise("UNKNOWN").alias("status"),
        F.sha2(F.concat_ws("|", F.col("record_locator"), F.col("segment_seq")), 256).alias("row_hash"),
    )
    .dropDuplicates(["pnr_id", "segment_seq"])
)

# MERGE on the natural key, so a rerun updates instead of duplicating
curated.createOrReplaceTempView("src")
spark.sql("""
  MERGE INTO curated.pnr_segments AS tgt
  USING src
  ON tgt.pnr_id = src.pnr_id AND tgt.segment_seq = src.segment_seq
  WHEN MATCHED THEN UPDATE SET *
  WHEN NOT MATCHED THEN INSERT *
""")

Migration strategy

For volume, I choose based on source behaviour. Static reference data gets a full load. Booking data that changes continuously gets CDC or incremental extracts keyed by update timestamp, plus a periodic full snapshot to catch deletes and late updates the incremental feed missed. If the source has no reliable update timestamp, I hash rows and compare, which is slower but catches silent changes.

I run old and new pipelines in parallel for at least one full business cycle, in travel that means covering a weekend peak, not just a quiet Tuesday. During that window I reconcile every day:

CheckSourceTargetAction on mismatch
Row count per travel_date1,284,0031,284,003Stop publish, inspect rejected rows
Sum of fare_amount412,908,114.55 EUR412,908,114.55 EURDiff by currency, check rounding
Distinct pnr_id891,204891,204Look for duplicate keys from retry
Null departure_utc00Quarantine file, do not publish partition
Sample hash match, 10k rows10,00010,000Trace field mapping for differing rows

Figures above are from a worked example. The point is the thresholds: any count or money mismatch blocks promotion. Rejected rows go to a quarantine table with the reason, so a bad airport code does not silently drop a booking.

Cutover is a pointer flip. Consumers read from curated.pnr_segments_v1, I publish curated.pnr_segments_v2, validate it, then swap the view. Rollback is swapping back. I keep the old pipeline running for two weeks after cutover and keep raw files for the retention period the airline contract requires.

pass fail Profile source and map fields Land raw with hash and lineage Transform to curated partition Validate counts, sums, keys Publish via view alias Quarantine and alert Dual run and reconcile daily

Failure modes I plan for

Late files arriving after a partition is published, so I allow late data to land in a restated partition and republish, with downstream notified. Duplicate delivery from the source, handled by the merge on natural key. Schema drift, where a new segment type appears, handled by routing unknown codes to quarantine instead of failing the whole load. PII in passenger names, handled by masking in non-production environments and restricting raw access, because GDPR and airline contracts both apply here. A cutover that breaks a consumer expecting the old column order, handled by keeping the old view available until consumers confirm the move.

If an interviewer pushes on tool choice, I would say the tool matters less than these properties: deterministic transforms, idempotent loads, reconciliation that can block a publish, and a rollback that does not require a reload. Spark, dbt, Airflow or a managed service can all provide them. Without them, a migration is just a hope that the counts match.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-4How do you handle data consistency across distributed systems?

Reported in Amadeus Data Engineer Interview Questions & Guide 2026

The 90-second answer

I start by splitting the data by what breaks if it is stale. In a travel booking flow at Amadeus scale, seat and room inventory, payment authorisation and the PNR record need strong consistency for the write that commits the sale. Search indexes, availability caches and analytics marts can tolerate eventual consistency if the lag is bounded and visible. One consistency model for everything either makes search slow or makes a booking double-sell a seat.

For the strong path I keep a single writer per aggregate. A booking service owns the PNR in one database and commits the state change and an outbox row in the same local transaction. Downstream systems consume that outbox. I do not use distributed two-phase commit across airline, hotel and payment services. It couples availability across vendors and holds locks while a partner is slow. I use a saga with explicit compensations for cross-service steps, and I accept that compensation is a business action, for example cancelling a held seat, rather than a rollback.

For the eventual path I make consumers idempotent and ordered per key, then reconcile. Duplicates are expected. The design question is how a duplicate is recognised and how drift is detected.

Booking service transaction PNR table Outbox table Relay publishes event Inventory consumer Dedup table keyed by event_id Inventory update

The dual-write problem and the outbox

Writing to the database and publishing to Kafka in separate steps creates a window where one succeeds and the other does not. The outbox closes it by making the event part of the database transaction.

SQL
-- PostgreSQL, checked against version 15 behaviour
BEGIN;
UPDATE pnr SET status = 'CONFIRMED', version = version + 1
WHERE pnr_id = 'PNR-8F21' AND version = 41;

INSERT INTO outbox (event_id, aggregate_id, type, payload, created_at)
VALUES ('evt_9c41', 'PNR-8F21', 'PNR_CONFIRMED',
        '{"pnr_id":"PNR-8F21","flight":"AF006","seat":"14A"}', now());
COMMIT;

A relay polls or reads the outbox with a CDC tool such as Debezium and publishes to Kafka. If the relay crashes after publishing but before marking the row sent, the event is published twice. That is safe only if the consumer handles it.

Python
# Idempotent consumer, Python 3.12 pseudocode against a dedup table
def handle(event):
    with db.transaction():
        seen = db.execute(
            "INSERT INTO processed_events(event_id) VALUES (%s) "
            "ON CONFLICT DO NOTHING RETURNING event_id",
            (event["event_id"],),
        ).fetchone()
        if seen is None:
            return  # duplicate delivery, already applied
        apply_inventory_change(event["payload"])

I keep processed_events for at least the maximum redelivery window. With a 7-day retention and, hypothetically, 2 million booking events per day, that table holds about 14 million rows. Partitioning by event_id hash and archiving after 7 days keeps lookups cheap. Without that retention, a replay from an old offset would reapply a seat decrement.

Choosing the model per data class

Data classConsistency targetMechanismStaleness budget
Seat and room inventory on commitStrong, single writerLocal transaction plus outbox, optimistic version checkZero on the committing write
Payment authorisation stateStrong per payment, saga across servicesState machine with idempotency key from the client, compensation on failureZero for authorised amount
Search and availability cacheEventualCDC into the index, keyed by flight or property5 to 30 seconds, shown as cached
Reporting and revenue martEventualBatch or streaming load with late-arrival handlingHours, reconciled daily

The version check matters under concurrency. Two agents try to confirm the last seat on AF006. Both read version 41. The first update succeeds and bumps the version to 42. The second update matches zero rows because its WHERE version = 41 fails, so it returns a conflict instead of overwriting. That is optimistic locking on the aggregate, and it works because there is one writer database for that PNR.

Failure modes I design for

Duplicate delivery from the relay or a Kafka rebalance. Handled by the dedup table and by making apply_inventory_change a conditional decrement that cannot go below zero.

Outbox relay lag. I alert on the age of the oldest unsent outbox row, not on broker lag alone. A relay stuck for 10 minutes means inventory consumers are 10 minutes stale even if Kafka looks healthy. Polling every 500 ms in my last design kept p99 publish lag under 2 seconds at moderate volume, and CDC removed the polling load.

Saga compensation that fails. Cancelling a seat hold can fail if the airline system is down. The saga state stays in COMPENSATING with a retry queue and an operator alert after, say, 3 failed attempts. I never mark the booking cancelled until the compensation is confirmed or a human resolves it.

Drift between systems. Even with idempotent consumers, a bug or a dropped partition causes drift. I run a nightly reconciliation that compares counts and checksums per flight and date between the booking database and the inventory store, and a per-booking check for high-value PNRs. Differences go to a repair queue that replays the outbox for that aggregate, rather than a bulk overwrite.

Clock skew across regions. I never use timestamps to order events for the same aggregate. Ordering comes from the aggregate version and the outbox sequence. Wall-clock time is for display and for staleness budgets only.

The trade-off I state in interviews: strong consistency costs availability and latency on the commit path, so I confine it to the smallest aggregate that needs it and push everything else to bounded eventual consistency with reconciliation. That keeps a partner outage from blocking search, while a booking still cannot sell the same seat twice.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-5Why should we hire you for this specific project at Amadeus?

Reported in Amadeus Data Engineer Interview Questions & Guide 2026

You should hire me because I have done the part of travel data work that usually breaks projects after go live. Not just moving files from A to B, but handling corrections, duplicates and late records in a way finance and compliance can audit. That is what I would bring here.

I would start by being honest about what I do not know yet. I do not know which feeds this project depends on, whether it is PNR and booking data, NDC offers, airline inventory, or settlement data, and I do not know your current platform. So in the first couple of weeks I would map each source with its owner, its format, how often it arrives, and how it corrects itself. In travel, a cancelled segment or a reissued ticket is not a new row to append. It changes the state of an existing booking, and if you load it in file order instead of event order you get a report that looks clean and is wrong.

After that mapping, the build is fairly predictable. I land raw data immutably, with the source key and both the source timestamp and the load timestamp on every record. Loads are idempotent, so if a partner resends a file after a timeout, which they do, a rerun does not double count. Then I validate before anything reaches the curated tables. If a record has no PNR locator, an unknown record state, or an event time in the future, it goes to a quarantine table with a reason code and an alert to the data steward. It does not silently disappear, and it does not pollute the numbers.

The proof I would show you is reconciliation. For a hypothetical day with 4.2 million PNR events, I would expect to account for every one of them. Say 18,000 are exact duplicates from a rerun, 300 are quarantined for invalid state, and the rest land in the curated layer. If those numbers do not add up to the partner manifest, we stop and find the gap. I would also track late arrivals separately. If 0.4 percent arrive more than 24 hours late, we load them, flag them, and tell the reporting team the first cut of the day will move.

On compliance, I treat GDPR and retention as design inputs. If a field is not needed for the use case, it stays out of the curated layer. If it is needed, access is controlled and masked where the consumer does not need the raw value. I have worked with that constraint before, and it is easier to build it in than to retrofit it after an audit finds personal data in a reporting table.

I am also not going to rebuild what Amadeus already has. If your platform team owns orchestration or streaming ingestion, I will use it and focus my time on the conforming logic and the checks, because that is where travel pipelines fail. Hire me if you want someone who will ask about correction semantics in week one, show you the reject queue in week four, and leave behind checks the next engineer can run without me in the room.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-6How do you manage shifting priorities within an Agile development cycle?

Reported in Amadeus Data Engineer Interview Questions & Guide 2026

The 90-second answer

I treat a priority change as a capacity and dependency problem, not as a new to-do list. First I ask what changed, who owns the decision, and what breaks if we move. Then I re-plan the sprint in the open with the product owner and the downstream consumers, because in data engineering a late change to an ingestion or a schema rarely stays inside one ticket.

At Amadeus that matters more than in a generic product team. A change to a PNR feed, a fare class mapping or a payment event can affect reconciliation, reporting for airlines, and audit trails that regulators expect to be reproducible. So I protect three things: the data contract, the delivery date for anything already committed to a release train, and the on-call and support load that a half-finished pipeline creates.

How I run it in practice

Mid-sprint, I do not silently absorb the new work. I put the change through a short intake check.

Yes No Schema or consumer change No contract change New priority raised Urgent regulatory or outage risk? Stop, assess impact, escalate to PO and tech lead Dependencies and contract impact? Negotiate scope, version contract, schedule backfill Re-score backlog and swap at next planning point Re-plan sprint explicitly

If it is a genuine incident, for example a feed starts dropping segments and revenue reporting is wrong, we stop the lowest-value work and record what was paused. If it is a product reprioritisation, we wait for the daily or the next refinement unless the product owner accepts the cost of interrupting work in progress.

The arithmetic forces an honest conversation. Suppose the team has 40 story points of capacity in a two-week sprint and has already spent 12 points on a streaming ingestion for schedule changes. A new request to add a new source market arrives, estimated at 8 points. It looks like a swap. In reality it needs 3 points of rework on partitioning, 2 points to update the data quality checks, and 1 point to re-run backfill validation. The true cost is 14 points, not 8, and it pushes a committed delivery by roughly a week. Naming that number early is what stops the team from starting two pipelines and finishing neither.

A worked trace

DayEventDecisionEffect on sprint
------------
3Product owner asks for new market feedIntake check: new source, same contract versionScored as 14 points including rework
3Team reviews committed airline reporting fixReporting fix has a contractual dateKept, not swapped
4Swap agreed in refinementLower-value dashboard enrichment moved to next sprintDashboard owner informed, ticket re-estimated
5Contract review with consumer teamField added as optional, v2 publishedNo breaking change, backfill scheduled
9Backfill runs in off-peak windowRow counts and checksums compared to source2% mismatch found, traced to late-arriving events

That last row is the failure mode I watch for. Shifting priorities often means a backfill or a reprocessing job gets squeezed into production hours. I schedule it in a defined window, monitor lag and cost, and keep the old and new tables side by side until the consumer signs off. If the mismatch cannot be explained, we roll back to the previous partition rather than ship a number we cannot defend.

What I push back on

I push back on three patterns. First, priority changes without a named owner who accepts what will slip. Second, schema changes described as minor when a downstream job does a strict parse or a join on that field. Third, a sprint that carries more than two or three items in progress. For pipelines, work in progress hides the real cost, because a half-built ingestion still consumes monitoring, storage and on-call attention.

I also keep a visible backlog with cost of delay, not just rank. A regulatory change to payment data retention has a hard date. A new dashboard has value but no penalty for slipping one sprint. When everything is P0, the team ends up context switching and the data quality work, which is what prevents the next incident, is always the thing deferred.

If I am asked for a concrete example, I would describe a sprint where we paused a non-critical enrichment, published a versioned contract, ran the backfill with reconciliation checks, and delivered the new feed one sprint later than the original ask but without breaking the committed reporting fix. That trade, made explicitly and early, is the outcome I aim for.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-7Can you describe a time you had to explain a complex technical issue to a non-technical stakeholder?

Reported in Amadeus Data Engineer Interview Questions & Guide 2026

The 90-second answer

At my previous role we fed nightly booking data from a GDS-style feed into a revenue reporting warehouse used by commercial finance. Finance flagged that revenue for a route was 4% higher in the warehouse than in the airline system of record. I had to explain why, without using the words idempotency, event ordering or late-arriving dimensions in the first pass.

I framed it as a post office problem. The airline sends us a letter every time a booking changes. Sometimes the same letter arrives twice, and sometimes a correction arrives before the original. Our warehouse was counting letters, not bookings. That gave finance a mental model they could repeat in their own meeting, and it let me move to the fix and the decision I needed from them: whether to restate the last 14 days or only fix going forward.

What actually happened

The feed delivered PNR updates as events keyed by pnr_id plus a sequence number from the source. Two defects combined. First, our loader retried a failed batch and re-inserted events because the staging table had no unique constraint on (pnr_id, seq). Second, a source correction with seq=118 arrived at 02:10, while the original seq=117 arrived at 02:40 after a network retry. The warehouse applied them in arrival order, so the older state won.

I quantified it before the meeting. Over 30 days we had 1.9 million PNR events. 41,000 were exact duplicates from retries, about 2.2%. Another 6,800 were out-of-order corrections where the final state in the warehouse differed from the final state in the source. Together they inflated gross booking value by roughly 3.8% on the affected routes, because cancelled and amended bookings were being counted alongside their replacements.

I showed finance a trace for one PNR, anonymised, because one concrete case beat an aggregate chart:

TimeEventWarehouse before fixCorrect final state
01:55seq=117 created, EUR 420EUR 420EUR 420
02:10seq=118 amended to EUR 310EUR 310EUR 310
02:40seq=117 retried, EUR 420EUR 730 (both rows summed)EUR 310

That table is what landed. Finance could see the double count in one row, and they stopped asking whether the airline numbers or ours were wrong in general. The question became a business choice about restatement.

How I adapted the explanation

I used three layers and let the stakeholder choose how deep to go. The first layer was the post office analogy and the 3.8% figure. The second layer was the trace table above. The third layer, for the finance analyst who asked, was the technical fix: a unique key on (pnr_id, seq) in staging, an upsert that keeps the highest seq per PNR, and a dead-letter check that alerts when seq gaps appear for more than 15 minutes.

I also named what I was not changing. We were not rebuilding the feed or asking the airline to change their sequence numbers. That mattered because the stakeholder's fear was a six-week project. The fix was a loader change plus a backfill, estimated at three days, with a reconciliation report they could sign off.

Outcome and follow-up

Finance chose a 14-day restatement, which covered the current reporting period without reopening closed months. After the backfill, the warehouse matched the airline system within 0.1% on gross booking value for the next four weeks, and the duplicate check became a daily data quality metric in the pipeline dashboard. I also added a one-page reconciliation note in plain language that finance reused for their own stakeholders, which is how I knew the explanation had worked. They were repeating the post office version accurately, not just nodding in the meeting.

If I were doing it again at Amadeus scale, I would bring the reconciliation query output to the first meeting rather than the second. Stakeholders trust a number they can rerun more than a diagram, even when the diagram is what makes the number understandable.

Curated: · Written: · Reviewed:

Difficulty: Easy
Q&A-8How do you approach cross-team collaboration when dependencies are unclear?

Reported in Amadeus Data Engineer Interview Questions & Guide 2026

The 90-second answer

I treat unclear dependencies as a discovery problem with a deadline, not as a reason to wait for a perfect org chart. In the first week I map who produces, who consumes, and who can break the thing I am building, then I write that map down as a dependency register with a named owner on each side. If an owner cannot be found, I escalate to a single accountable lead and timebox the ambiguity: build against a stub or a snapshot, ship behind a flag, and set a date by which the real contract must be confirmed or the scope changes.

At Amadeus that matters because a data pipeline rarely has one team behind it. A bookings feed might come from a reservations platform, be enriched by a departure control system, and land in a warehouse used by airline customers and internal revenue teams. Each handoff can change a field meaning, a timezone, or a cutoff time without anyone sending a message.

How I run it in practice

First, I draw the flow before I write code. I list every dataset, API, and file I touch, and for each one I record the producing team, the consuming teams, the update cadence, and what breaks if it is late or wrong. A mermaid diagram in the design doc is enough to start the conversation, because people correct a picture faster than they correct prose.

Reservations platform Raw PNR feed Conformed bookings model Warehouse tables Airline customer reports Internal revenue analytics Departure control Reference data: airports, airlines

Second, I turn the map into a register and force a decision on the riskiest edges. The table below is the version I keep in the repo next to the pipeline, not in a slide deck.

DependencyExampleFirst moveExit criterion
Upstream producerPNR events from reservationsAsk for schema, cadence, and change notice periodContract test runs in CI
Reference data ownerAirport and airline codesPin a versioned snapshot, diff on loadNo silent code changes
Downstream consumerAirline report due 06:00 localAgree freshness SLA and late-data ruleAlert fires before breach
Shared platformWarehouse ingestion and identityConfirm quota, retention, and access pathLoad test at 2x peak

Third, I build so the pipeline survives the answer being "we do not know yet." I ingest raw data unchanged, keep event time and ingestion time separate, and make every transform idempotent so a late correction can be replayed without duplicating rows. If a field is disputed, I carry both versions with a source column instead of picking one in a meeting and losing the other.

A minimal contract makes the negotiation concrete. This is the shape I propose to the producing team:

YAML
# contracts/bookings_pnr_v1.yaml
dataset: bookings_pnr
version: 1
owner: reservations-data
cadence: every 15 minutes
fields:
  pnr_record_locator: { type: string, required: true }
  departure_utc: { type: timestamp, timezone: UTC }
  passenger_count: { type: integer, min: 0 }
change_notice_days: 10
late_data_policy: accept up to 24h, restate affected partitions

If they will not sign it, the contract test still runs against the raw feed and fails loudly when a field disappears or changes type. That failure is the collaboration tool. It gives both teams a shared fact instead of two opinions.

Failure modes I watch for

The common one is a silent upstream change: a field renamed, a cutoff moved from 23:59 to 22:00, or a status code reused. I detect it with schema checks on ingest, row count and null rate comparisons against the previous seven days, and a freshness alert set to fire at half the SLA, not at the breach. A second failure is the missing owner, where a dataset is produced by a team that has moved on. I detect that when no one responds to a contract review within five working days, and I escalate with the register showing the blast radius: which reports and customers stop if the feed stops.

I also avoid the opposite trap, spending three weeks in workshops while the pipeline stays blocked. My rule is that discovery gets one sprint. After that, I ship against the stub, document the assumption in the code, and put the open question on the team backlog with a named person and a date. That keeps delivery moving and makes the cost of the ambiguity visible to whoever can actually resolve it.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-9Design an ETL pipeline to process 10TB daily from multiple sources while ensuring data quality and compliance with GDPR?

Reported in Amadeus Data Engineer Interview Questions & Guide 2026

The 90-second answer

I would split this into ingestion, transformation and serving, with quality and GDPR controls applied at each stage rather than bolted on at the end. At 10 TB per day the average is about 116 MB/s, but travel sources burst around booking peaks, so I would design for 3 to 5 times average and let the pipeline scale horizontally.

Sources at Amadeus would include airline and hotel booking feeds, GDS messages, payment events and CRM data. I would ingest them through Kafka topics per source with a schema registry, land raw files in an S3 or Azure Data Lake zone in the EU, then run Spark jobs orchestrated by Airflow to build a curated zone as Delta Lake or Iceberg tables partitioned by date and source. Batch micro-batches every 15 minutes fit most reporting and downstream ML use cases. If a consumer needs sub-minute freshness, I would add a streaming path for that topic only, because running everything streaming costs more and makes backfills harder.

GDPR is not a filter at the end. I classify fields at ingestion, pseudonymise direct identifiers before they reach the curated zone, and keep the mapping in a separate vault with restricted access. Every table carries lineage, retention and owner metadata so an erasure request can be traced and executed.

Sources: GDS, airline, hotel, CRM Kafka + schema registry Raw zone: EU object storage Spark validation and transforms Curated zone: Delta/Iceberg Serving: warehouse and APIs Quarantine and quality metrics Erasure and retention jobs

Quality gates that actually stop bad data

I would define contracts per source in the registry and enforce them in Spark before any curated write. Failures go to a quarantine table with the raw record, the failed rule and the source offset, so the source team can fix and replay without reprocessing 10 TB.

CheckExample ruleAction on failure
Schemapnr_locator matches [A-Z0-9]{6}, types match registryQuarantine record, alert source owner
CompletenessBooking feed must contain at least 98% of expected daily volume per airlineBlock curated publish, page on-call
Uniqueness(source, event_id) unique in raw zoneDeduplicate on event_id, keep latest ingested_at
Referentialcustomer_id exists in identity table or is flagged as guestRoute to quarantine, do not drop silently
FreshnessPartition ds complete within 2 hours of day closeHold downstream dbt models

A typical validation step looks like this in PySpark:

Python
# Python 3.11, PySpark 3.5
from pyspark.sql import functions as F

raw = spark.table("raw.bookings")
valid, quarantine = raw.filter(F.col("pnr_locator").rlike(r"^[A-Z0-9]{6}$")), raw.filter(~F.col("pnr_locator").rlike(r"^[A-Z0-9]{6}$"))

valid = valid.withColumn("customer_key", F.sha2(F.concat(F.col("customer_id"), F.lit(salt_ref)), 256))
valid.write.format("delta").mode("append").partitionBy("ds", "source").saveAsTable("curated.bookings")
quarantine.write.format("delta").mode("append").saveAsTable("quarantine.bookings")

The hash is a pseudonym, not anonymisation. I keep the salt reference in a key vault, rotate it, and never store the plain email or passport number in the curated zone. Tokenisation for payment data would be handled by the payments service, not by the pipeline.

GDPR controls I would name in the interview

Data minimisation comes first. If a reporting table does not need a passenger name, it does not get it. I would maintain a field-level catalogue tagging each column as direct identifier, indirect identifier or non-personal, with lawful basis and retention period. That catalogue drives both the pseudonymisation job and the erasure job.

For the right to erasure, Iceberg or Delta deletion vectors let me delete by customer_key without rewriting whole partitions, and I would run a nightly job that reads erasure requests from the CRM, deletes from curated tables, and writes a tombstone record to prove completion. Backups and raw zone files need the same treatment on their retention cycle, which I would state explicitly: raw zone 30 days, curated zone per business need, backups 90 days with erasure applied on restore.

Residency matters for Amadeus customers. I would keep processing in EU regions, encrypt at rest with customer-managed keys and in transit with TLS 1.2 or higher, and log every access to personal data to an audit table that security can review. Access to the identity vault is break-glass only, with a ticket and a time limit.

Failure modes and trade-offs

Schema drift is the common one. A source adds a field or changes a type and Spark either fails or silently coerces. The registry with backward compatibility checks in CI catches most of this, and I would version topics so a breaking change creates a new topic version instead of breaking consumers.

Late and duplicate events are normal in travel data. I would use event time, not processing time, for partitioning, allow late data up to 48 hours with a restatement job, and make every write idempotent on (source, event_id) so a replay does not double count revenue.

The main trade-off is batch versus streaming. Batch gives me cheap backfills, deterministic quality gates and simple lineage. Streaming gives freshness but complicates exactly-once semantics and erasure. I would start batch for the 10 TB core and add streaming only where a product requirement justifies the operational cost, and I would say that choice out loud in the design review.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-10Design a cloud-native batch ETL platform on AWS or Azure for 2.5 TB/day of mixed-source data with orchestration, quality checks, and incremental loads?

Reported in Amadeus Data Engineer Interview Questions & Guide 2026

The 90-second answer

I would pick AWS and build it around S3 as the landing zone, Spark on EMR or Glue for transformation, and MWAA (managed Airflow) for orchestration. The key decision is to separate ingestion, which must never lose data, from transformation, which must be rerunnable. Sources land raw in S3, Spark reads only new partitions, applies an incremental merge into a curated Iceberg table, and quality checks gate promotion to the serving layer. That gives me idempotent reruns and backfills without reprocessing 2.5 TB every night.

Assume 2.5 TB/day compressed, roughly 29 MB/s average and 3 to 5 times that at peak ingestion. That is well within S3 and Spark, but it rules out a single nightly full load. I would partition raw data by source and ingestion date, and curated data by event date, so a rerun touches one day, not history.

Sources: airline, hotel, GDS feeds, CDC Ingestion: Kinesis, DMS, S3 events S3 raw zone, partitioned by source and date Airflow DAG: validate raw files Spark incremental merge to Iceberg Quality checks and quarantine Curated zone and Athena or Redshift serving

Ingestion and incremental loads

Mixed sources need different capture, but one landing contract. File feeds from airlines and hotels arrive via S3 or SFTP into a raw bucket with a manifest. Database changes arrive through DMS with CDC enabled, or Debezium on MSK if the source is Kafka based. Streaming events go through Kinesis Data Firehose with dynamic partitioning by date. Every file gets a checksum, record count, and source timestamp on arrival. Airflow sensors wait for the manifest, not for a fixed clock time, because supplier files slip.

Incremental logic depends on the source type:

Source typeIncremental keyMerge rule
CDC from booking or inventory tablesprimary key plus updated_atupsert, delete flag removes row
Daily file extractsbusiness key plus file datemerge only partitions newer than watermark
Event streamsevent iddeduplicate on event id within the day partition

The watermark is stored per source in a control table, for example etl_watermark(source, last_successful_ts). Spark reads WHERE updated_at > watermark, merges, and only advances the watermark after the Iceberg commit succeeds. If the job fails halfway, the watermark stays put and the rerun re-reads the same window. That is what makes the pipeline safe to retry.

Python
# PySpark 3.5, incremental merge into Iceberg
from pyspark.sql import functions as F

watermark = spark.sql(
    "SELECT last_successful_ts FROM etl_watermark WHERE source='bookings'"
).collect()[0][0]

updates = (
    spark.read.table("raw.bookings_cdc")
    .filter(F.col("updated_at") > watermark)
)

target = spark.read.table("curated.bookings")
merged = updates.join(
    target, updates.id == target.id, "left_anti"
).unionByName(updates)  # simplified: replace with Iceberg MERGE in prod
merged.write.mode("overwrite").option("overwriteSchema", "false").saveAsTable("curated.bookings")
spark.sql(f"UPDATE etl_watermark SET last_successful_ts = '{max_ts}' WHERE source='bookings'")

In production I would use Iceberg MERGE INTO rather than the simplified union above, and I would keep the raw CDC files for 30 days so a bad merge can be replayed.

Quality checks and failure handling

Checks run in two places. Raw checks in Airflow, using Great Expectations or Soda, verify file count, schema, row count within 20 percent of the 7-day median, and no nulls in primary keys. Curated checks after the merge verify uniqueness on the business key, referential integrity between bookings and passengers, and freshness, meaning the max event time is within the expected lag for that source.

Failures split into two paths. A file that fails raw checks goes to a quarantine prefix in S3 with the error report, and the DAG fails that branch while other sources continue. A merge that fails curated checks blocks promotion, so Athena and Redshift keep serving yesterday's table. Alerts go to PagerDuty for a missed watermark older than 4 hours, and to Slack for quarantine volume above 1 percent of daily rows. I would track three numbers on a dashboard: ingestion lag per source, quarantine rate, and rows merged per run. A sudden drop in rows merged usually means an upstream schema change, and the quarantine report shows the exact field.

Orchestration and cost control

Airflow DAGs are one per source, plus a parent DAG for cross-source joins such as bookings joined to flights. Tasks are idempotent: each Spark job writes to a staging Iceberg table, then a short commit task swaps it in. EMR Serverless or Glue with autoscaling keeps cost down, since batch jobs run 2 to 4 hours a day rather than 24. I would set a budget alert at 80 percent of the monthly forecast and use S3 Intelligent-Tiering for raw data older than 90 days. Backfills are just a DAG run with a date parameter, which is the practical test that the design works.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-11Design a batch data platform that contrasts ETL and ELT by migrating legacy Spark ETL workloads to Snowflake-based ELT with hourly refreshes?

Reported in Amadeus Data Engineer Interview Questions & Guide 2026

The 90-second answer

I would keep the hourly batch cadence and the source contracts, and move the transformation out of Spark into Snowflake. Sources land raw in a Snowflake staging schema every hour, dbt models build the curated tables incrementally in SQL, and downstream marts read only from those curated tables. Spark stays only where it still earns its keep, for example parsing large semi-structured GDS or PNR files that are awkward in SQL, and even there it writes raw files to the stage instead of a finished table.

That split is the ETL to ELT contrast. Legacy ETL extracts, transforms in Spark, then loads a small curated output. ELT loads first, then transforms in the warehouse where the data already lives. For Amadeus style workloads, booking events, flight segments, passenger records and fare data arriving hourly, the warehouse approach wins on operability: one SQL codebase, versioned in git, testable with dbt, and no separate Spark cluster to size, patch and debug at 03:00.

Sources: GDS feeds, PNR events, schedules Hourly extract to object storage Snowflake stage: raw tables dbt incremental models Curated tables: bookings, segments Marts and BI dbt tests and row-count checks

ETL versus ELT for this workload

DimensionLegacy Spark ETLSnowflake ELT
---------
---------
---------
---------
---------
---------
Where transform runsSpark cluster, before loadSnowflake warehouse, after load
CodeScala or PySpark jobs, often opaqueSQL in dbt, reviewed like app code
Reprocessing one hourRe-run Spark job, reload targetRe-run dbt model for that partition
Schema changeChange job, backfill, reloadAdd column in raw, update model, backfill in SQL
ScalingTune executors, shuffle, partitionsResize warehouse, cluster by event date
Main cost driverAlways-on or scheduled cluster hoursWarehouse credits per second of compute

ELT is not free. If a transform needs heavy UDF logic, iterative ML feature building, or joins across terabytes that shuffle badly in SQL, Spark may still be the right engine. I would name that exception up front and keep those jobs, rather than forcing everything into SQL.

Hourly design in Snowflake

Raw tables are append-only and partitioned logically by ingest_hour. A COPY INTO loads the hour's files, a MERGE on the natural key (pnr_id, segment_id, event_id) handles updates and cancellations, and dbt incremental models maintain the curated tables. Late arriving corrections are the normal case in travel data, so the merge key must include a source sequence or updated_at, and deletes arrive as tombstone rows rather than physical deletes.

SQL
-- dbt model: models/marts/bookings.sql (checked against dbt Core 1.8)
{{ config(materialized='incremental', unique_key='booking_id',
           incremental_strategy='merge') }}

select booking_id, pnr_id, status, fare_amount, event_date
from {{ ref('stg_booking_events') }}
{% if is_incremental() %}
where ingest_hour > (select max(ingest_hour) from {{ this }})
{% endif %}

Orchestration runs hourly: extract, COPY INTO, dbt run, dbt test, then publish. Each run writes a control row with source file count, raw row count, curated row count and a checksum. A failed test blocks the publish step, so BI never sees a half loaded hour.

Worked trace, one hourly run

StepInputOutputCheck
Extract14 files, 2.1 GB14 files in stagefile count matches manifest
COPY INTO14 files1,840,220 raw rowsrow count within 5% of source
MERGE1,840,220 rows1,812,004 upserts, 28,216 tombstonesno duplicate event_id
dbt runincremental modelsbookings +12,400 rowsunique_key test passes
Publishcurated tablesmarts refreshedchecksum matches control row

Migration and cost

I would migrate one feed at a time, run Spark ETL and Snowflake ELT in parallel for two weeks, and compare row counts and sampled records hour by hour. Cutover only after the diff is zero on keys and within tolerance on aggregates like total fare per route.

Hypothetical figures to size the trade-off: a scheduled Spark cluster at 8 workers for 45 minutes per hour costs roughly 6 cluster-hours a day. The same transform in Snowflake on an X-Large warehouse for 8 minutes per hour is about 1.1 warehouse-hours a day, and it scales to zero between runs. The real saving is not the credit bill, it is deleting a distributed system from the critical path.

Failure modes I would call out: duplicate loads from a retried extract, handled by idempotent COPY INTO with file metadata and merge on event_id; schema drift from a source adding a field, handled by raw tables that keep the payload as VARIANT plus typed columns added deliberately; and a warehouse queue when BI and dbt collide, handled by separate warehouses for load, transform and BI with concurrency limits. Each one has a named check in the pipeline, not a hope that someone notices.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-12Design an ETL pipeline ensuring exactly-once processing semantics for high-volume transactional data in a financial services application?

Reported in Amadeus Data Engineer Interview Questions & Guide 2026

The 90-second answer

I would start by narrowing the claim. True exactly-once delivery across a source database, a broker and a warehouse does not exist. What I build is effectively-once processing: at-least-once delivery plus an idempotent sink keyed on a stable business key, so a replay changes nothing.

For high-volume transactional data, say card payments or ledger postings, I would use change data capture from the source, a transactional streaming job, and a deterministic merge into the target. The source emits an outbox or CDC stream with a monotonically increasing sequence per account. Kafka carries it with a transactional producer. Flink or Kafka Streams consumes with read_committed, processes in a transaction, and commits the sink write and the offset checkpoint together where the sink supports it. Where the sink is a warehouse that cannot join that transaction, I stage the batch, dedupe on the business key, then merge. A replay lands in staging and merges to zero new rows.

Design

Source DB: payments table CDC / transactional outbox Kafka topic: payments.v1 Flink job: validate, enrich, aggregate Staging table: raw + dedupe key Warehouse: payments_fact Checkpoint: offsets + state

Three decisions carry the semantics.

  1. Stable identity. Every event carries event_id (source UUID) and business_key (for example payment_id plus version). The sink has a unique constraint on that pair. Retries reuse the same key, so the second write is a no-op or an upsert to the same row.
  2. Atomic checkpoint. In Flink with Kafka as both source and sink, I use exactly-once mode with a transactional producer and processing.mode=exactly_once. The checkpoint stores operator state and Kafka offsets in one snapshot. On recovery the job replays from the last completed checkpoint, and Kafka discards aborted transactions. With a JDBC or warehouse sink, Flink's two-phase commit or a staging merge replaces that atomicity.
  3. Idempotent transforms. Aggregates must be recomputable from the event log. I keep running balances as derived state rebuilt from events, never as a counter incremented in place without the event that caused it.

Worked replay trace

Hypothetical figures, labelled as such: 50,000 events per second at peak, 2 billion rows in the fact table.

StepEventSink actionResult
1payment_id=p_100, version=3, amount=120.00Insert staging row, merge to factFact row created, offset 88123 committed
2Job crashes before checkpointNo commitOffset stays at 88122, transaction aborted
3Replay of same eventStaging insert hits unique key, merge updates same rowNo duplicate, amount still 120.00
4New event version=4, amount=125.00Upsert on (payment_id, version)New version row, prior version retained for audit

Where this breaks, and how I detect it

Late or out-of-order events arrive after a checkpoint. I allow a watermark of, say, 10 minutes for late data and route later arrivals to a corrections stream that reprocesses the affected partition. Detection: a daily reconciliation query compares source counts and amount sums per hour against the fact table, and alerts on any delta above zero for closed hours.

A poison event that fails validation would block the partition. I send it to a dead-letter topic with the error and the raw payload, keep the main flow moving, and replay it after a fix. Detection: dead-letter depth and age, with an alert at more than 100 messages or any message older than 1 hour.

Schema drift from the source is the third failure. I register schemas in a registry with backward compatibility enforced in CI, and I version the topic when a field changes meaning. Detection: consumer deserialization failures and a contract test that runs on every source deploy.

What I would not do

I would not claim Kafka's exactly-once semantics alone solve this. Those guarantees cover the broker and the stream processor. The moment the sink is a warehouse, a payment gateway or a file, the guarantee ends and the dedupe key and staging merge do the work. I also would not use a distributed transaction across the source database and the warehouse. At this volume it couples availability and adds seconds of latency per commit. The outbox pattern gives the same correctness with a local transaction at the source and asynchronous delivery.

If the interviewer pushes on cost, I would size the staging table for a 24-hour replay window, partition the fact table by event date, and keep the dedupe keys for 30 days. That bounds storage while covering every realistic replay.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-13Explain INNER JOIN vs LEFT JOIN semantics, NULL behavior, and common pitfalls using real analytics examples?

Reported in Amadeus Data Engineer Interview Questions & Guide 2026

The 90-second answer

INNER JOIN returns only rows that match on both sides. LEFT JOIN returns every row from the left table, plus matching rows from the right where they exist, and NULLs for the right-side columns where they do not. That one difference drives the NULL behaviour and most of the bugs I see in analytics SQL.

At Amadeus the classic case is bookings on the left and payments or flight segments on the right. A booking can exist with no payment yet, or with no segment after a cancellation. If the business question is "revenue from paid bookings", INNER is correct. If it is "all bookings, flag the unpaid ones", LEFT is correct and the unpaid rows are the point.

Worked trace

Hypothetical but realistic figures. bookings has 3 rows, payments has 2.

| booking_id | passenger | fare_eur | | booking_id | paid_eur | status | |---|---|---|---|---|---| | B1 | A. Chen | 420 | | B1 | 420 | settled | | B2 | J. Okafor | 310 | | B2 | 100 | partial | | B3 | M. Rossi | 275 | | | | |

SQL
-- INNER: 2 rows. B3 disappears.
SELECT b.booking_id, b.fare_eur, p.paid_eur
FROM bookings b
INNER JOIN payments p ON p.booking_id = b.booking_id;

-- LEFT: 3 rows. B3 survives with NULL payment columns.
SELECT b.booking_id, b.fare_eur, p.paid_eur, p.status
FROM bookings b
LEFT JOIN payments p ON p.booking_id = b.booking_id;
QueryB1B2B3
INNER420 / 420310 / 100absent
LEFT420 / 420310 / 100275 / NULL

NULL on the right is not a value stored in payments. It is the join saying "no match". That matters for aggregation. COUNT(*) after the LEFT JOIN returns 3. COUNT(p.booking_id) returns 2, because it skips NULLs. SUM(p.paid_eur) returns 520 and ignores B3, which is usually what you want for collected revenue. SUM(b.fare_eur) after the join returns 1005, the fare total for all bookings, which is a different question.

Pitfall 1: a WHERE clause quietly converts LEFT to INNER

This is the one I check first in review:

SQL
SELECT b.booking_id, p.status
FROM bookings b
LEFT JOIN payments p ON p.booking_id = b.booking_id
WHERE p.status = 'settled';  -- B3 and B2-partial are filtered out

WHERE p.status = 'settled' rejects NULL, because NULL = 'settled' is not true. The LEFT JOIN now behaves like an INNER JOIN plus a filter. If the intent is "settled payments, plus bookings with no payment", the condition belongs in the ON clause:

SQL
SELECT b.booking_id, p.status
FROM bookings b
LEFT JOIN payments p
  ON p.booking_id = b.booking_id
 AND p.status = 'settled'
WHERE p.booking_id IS NULL OR p.status = 'settled';

Simpler and clearer in most cases: keep the LEFT JOIN, filter in the ON clause, and let the caller decide. The same trap appears with WHERE p.paid_eur > 0, WHERE p.booking_id IS NOT NULL used as a "cleanup", and any WHERE on a right-table column that is not null-safe.

Pitfall 2: NULL join keys never match

ON p.booking_id = b.booking_id never matches when either side is NULL, in INNER or LEFT. In a LEFT JOIN the left row is still kept, which can hide a data quality problem. A booking with a NULL booking_id in payments will never join, and the booking will look unpaid forever. I would add a data quality check for NULL or empty join keys upstream rather than patching it in the join with COALESCE, which masks the source issue and breaks partition pruning in engines like Spark or BigQuery.

Pitfall 3: fan-out inflates measures

Joining bookings to flight segments is one-to-many. One booking with 3 segments becomes 3 rows. SUM(b.fare_eur) then counts that fare 3 times. The join is correct, the aggregation is wrong. Fix it by aggregating the many side first, or by aggregating the one side in a subquery before the join:

SQL
SELECT b.booking_id, b.fare_eur, s.segment_count
FROM bookings b
LEFT JOIN (
  SELECT booking_id, COUNT(*) AS segment_count
  FROM flight_segments
  GROUP BY booking_id
) s ON s.booking_id = b.booking_id;

Choosing between them

QuestionJoinWhy
Revenue only where a settled payment existsINNERUnpaid bookings are noise
All bookings, report unpaid or unflown as NULLLEFTAbsence is the signal
All bookings, but only settled payments should attachLEFT with condition in ONKeeps unmatched bookings
Count bookings vs count paymentsLEFT, then COUNT(b.id) vs COUNT(p.id)COUNT(*) conflates the two

My rule in a pipeline: write the LEFT JOIN, then read the WHERE clause and ask whether it mentions the right table. If it does, either move that predicate into ON or admit the query is an INNER JOIN and write it that way. Explicit beats clever when the next person debugs a revenue drop at 2 a.m.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-14Design a sales reporting data model with correct keys and relationships for fast revenue and margin reporting?

Reported in Amadeus Data Engineer Interview Questions & Guide 2026

The 90-second answer

I would model this as a star schema in the warehouse, with one fact table at a clearly stated grain: one row per sales line, meaning one ticket or booking segment sold. That grain lets revenue, cost and margin roll up by day, agency, airline, route or sales rep without double counting when a PNR contains several passengers or segments.

The core tables are fact_sales, dim_date, dim_agency, dim_airline, dim_route, dim_product and dim_sales_rep. fact_sales carries foreign keys to every dimension plus the measures: gross_revenue, discount, net_revenue, cost, commission and margin. I keep margin as a stored measure only if finance defines it identically everywhere, otherwise I store its components and calculate it in the semantic layer. That avoids two teams getting different margins from the same fact.

For Amadeus-style travel sales, the natural business key is the booking reference plus ticket number, but I would not use it as the primary key. I use a surrogate sales_key for joins and keep source_system, source_line_id, booking_ref and ticket_no as natural keys for deduplication on reload. source_line_id is the source row identifier, distinct for a sale and for its refund.

SQL
-- Checked against PostgreSQL 16 syntax for illustration
CREATE TABLE fact_sales (
    sales_key        BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    source_system    VARCHAR(20) NOT NULL,
    source_line_id   VARCHAR(40) NOT NULL,
    booking_ref      VARCHAR(12) NOT NULL,
    ticket_no        VARCHAR(20) NOT NULL,
    line_type        VARCHAR(10) NOT NULL,  -- SALE or REFUND
    sale_date_key    INTEGER NOT NULL REFERENCES dim_date(date_key),
    agency_key       INTEGER NOT NULL REFERENCES dim_agency(agency_key),
    airline_key      INTEGER NOT NULL REFERENCES dim_airline(airline_key),
    route_key        INTEGER NOT NULL REFERENCES dim_route(route_key),
    sales_rep_key    INTEGER REFERENCES dim_sales_rep(sales_rep_key),
    channel          VARCHAR(20) NOT NULL,  -- degenerate dimension
    currency_code    CHAR(3) NOT NULL,
    gross_revenue    DECIMAL(14,2) NOT NULL,
    discount         DECIMAL(14,2) NOT NULL DEFAULT 0,
    cost             DECIMAL(14,2) NOT NULL,
    commission       DECIMAL(14,2) NOT NULL DEFAULT 0,
    UNIQUE (source_system, source_line_id)
);

Keys and relationships

TableKey choiceWhy
---------
dim_datedate_key as YYYYMMDD integerFast range filters and partition pruning by month
dim_agencySurrogate agency_key, SCD Type 2 on region and parent groupAgency moves region mid-year; history must not rewrite last year margin by region
dim_routeSurrogate route_key from origin, destination, cabinSame city pair in different cabins has different cost and margin
fact_salesSurrogate sales_key, unique on (source_system, source_line_id)Stable joins even if source reissues a booking reference, and reloads are idempotent

dim_agency is the table interviewers probe. If an agency is reclassified from region EMEA-West to EMEA-Central in March, a Type 1 update would restate January and February. Type 2 keeps two rows with effective_from and effective_to, and fact_sales.agency_key points to the version live on sale_date. Reporting by current hierarchy is then a separate view that maps old keys to the current parent, so finance can reconcile both views.

Worked trace

One PNR, two tickets, one refund. All figures in EUR, hypothetical but labelled as such. The refund has its own source_line_id, so it does not collide with the original sale under the unique constraint.

source_line_idline_typeticket_nogrossdiscountcostcommissionnet_revenuemargin
L1001SALE0012345678901420.0020.00310.0025.00400.0065.00
L1002SALE0012345678902420.0020.00310.0025.00400.0065.00
L1003REFUND0012345678901-420.00-20.00-310.00-25.00-400.00-65.00

Net revenue is gross - discount. Margin is net_revenue - cost - commission. The refund is a new fact row with negative measures and the same booking_ref and ticket_no, rather than updating the original sale. That preserves the audit trail and lets daily revenue be summed directly. If I updated in place, a report run after the refund could not explain why yesterday total changed.

Making it fast

Partition fact_sales by sale_date_key month and cluster or sort by agency_key within the partition, since most dashboards filter by period first and agency second. In a columnar warehouse such as Snowflake or BigQuery that gives partition pruning plus small scans for the common query: revenue and margin by month and agency. I would also publish a pre-aggregated table agg_sales_month_agency at month by agency by airline grain, refreshed incrementally after each load. The fact stays the source of truth; the aggregate is disposable and rebuildable.

Failure modes I would name

Late arriving refunds and commission clawbacks land after month close. I handle them as new rows dated on the refund date, with a separate accounting_date column if finance needs restatement, and I reconcile fact totals to the finance ledger nightly with a tolerance of zero on count and a small tolerance on amount for FX rounding. Duplicate loads are caught by the unique constraint on (source_system, source_line_id). Currency is stored in original currency plus a reporting_currency amount converted at the ECB daily rate for the sale date, so a rate revision does not silently change historical margin. Missing dimension keys go to a quarantine table with the raw payload, and the load fails the batch if the quarantine rate exceeds 0.1 percent, because a silent unknown agency hides exactly the sales a manager is asking about.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-15Explain how you used Python to design, implement, validate, and operate production data pipelines?

Reported in Amadeus Data Engineer Interview Questions & Guide 2026

The 90-second answer

I would walk through one pipeline I owned end to end, using booking and departure events as the example. The job ingested about 40 million events a day (hypothetical figure from that project) from a message queue into a partitioned lakehouse table, then published a curated daily snapshot for reporting. Python handled orchestration glue, transformation, validation and operational controls. Spark or the warehouse handled the heavy scans. That split kept Python code testable and stopped it becoming a bottleneck.

Design came first. I made ingestion idempotent by deriving a deterministic batch key from source, event date and file offset range, and I partitioned output by event date and market code. Schema changes went through a registry with explicit compatibility rules, so a new optional field could land without breaking last week's backfill. I also decided the failure contract up front: malformed records go to a dead-letter partition with the raw payload and error, valid records continue, and a run only succeeds when reconciliation counts match.

Queue / file landing Python ingest: validate envelope Transform with typed models Data quality checks Idempotent write to lakehouse Dead-letter partition Reconciliation and alerting

Implementation used Python 3.12 with Pydantic models for the envelope and the curated record, and a small library for the write path so retries shared one code path.

Python
import hashlib
from datetime import date

def batch_key(source: str, event_date: date, offset_start: int, offset_end: int) -> str:
    raw = f"{source}|{event_date.isoformat()}|{offset_start}|{offset_end}"
    return hashlib.sha256(raw.encode()).hexdigest()[:32]

def write_batch(conn, batch, key: str, rows: list[dict]) -> str:
    # Insert the key first. A retry after a timeout finds it and skips the write.
    cur = conn.execute("INSERT INTO ingestion_batches(batch_key, status) VALUES (?, 'running') ON CONFLICT DO NOTHING", (key,))
    if cur.rowcount == 0:
        return "already_applied"
    conn.executemany("INSERT INTO curated_bookings VALUES (?, ?, ?)", [(r["booking_id"], r["market"], r["event_date"]) for r in rows])
    conn.execute("UPDATE ingestion_batches SET status='done' WHERE batch_key=?", (key,))
    conn.commit()
    return "applied"

Validation was not a separate phase bolted on at the end. Envelope validation rejected records missing booking_id or with an unparseable timestamp before any transform ran. After the transform, Pandera checks enforced ranges and allowed values, for example market in a fixed set and event_date not in the future. Reconciliation compared source count, accepted count and dead-letter count for the batch. If source != accepted + dead_letter, the run failed even if the write succeeded.

CheckWhere it runsFailure action
Envelope schemaIngest, per recordRoute to dead-letter, keep raw payload
Value ranges and enumsAfter transformFail batch if >0.1% rejected, else dead-letter
Count reconciliationAfter writeMark batch failed, page on-call
FreshnessHourlyAlert if latest event lags >90 minutes
Duplicate booking_id in batchAfter transformFail batch, inspect upstream replay

Operating it meant treating backfills as normal runs. The same batch key logic meant reprocessing a day produced the same key, so a backfill either skipped already applied partitions or, with an explicit override flag, replaced them in one transaction. I tracked p95 run duration, dead-letter rate, and partition size per market. When dead-letter rate crossed 0.5% for two consecutive runs, the alert fired with the top error codes attached, which usually pointed to a source schema change rather than a code bug. Retries used exponential backoff with jitter for transient queue errors, and no retry for validation failures, since retrying those only burned compute.

The failure mode I watched most closely was a silent upstream replay. Counts still reconciled, but duplicate booking_id values appeared. The duplicate check caught it, and the fix was to deduplicate on (booking_id, event_timestamp) at ingest and add a source offset watermark so replays were detected before they reached the curated table.

Curated: · Written: · Reviewed:

Difficulty: Medium

Curated: · Written: · Reviewed: