Amazon Senior Data Engineer Interview Preparation Guide
Amazon's Data Engineer interview process for senior-level candidates involves a multi-stage evaluation designed to assess deep technical expertise, system architecture thinking, and alignment with Amazon's Leadership Principles. The process typically includes recruiter screening, two technical phone screens focusing on SQL/coding and system design, followed by five onsite interview rounds covering data modeling, system architecture, ETL pipeline design, behavioral assessment, and a bar raiser evaluation. The entire process emphasizes practical problem-solving at scale, AWS ecosystem expertise, and demonstrated leadership capabilities.
Interview Rounds
Recruiter Screening
What to Expect
The initial recruiter call focuses on validating your background, discussing career motivation, confirming role understanding, and assessing initial cultural fit with Amazon. The recruiter will review your experience with data systems and AWS, discuss your understanding of the Data Engineer position's responsibilities in building scalable data infrastructure, and outline the interview timeline. This stage also includes a recruiter callback after onsite interviews to discuss offer details and logistics. Be prepared to discuss your most relevant projects and why you're interested in joining Amazon's data platform organization.
Tips & Advice
Clearly articulate your progression in data engineering and highlight 2-3 significant projects. Mention AWS services you've worked with and big data systems you've built. Prepare concrete examples showing impact: metrics about data systems you've optimized or pipelines you've led. Ask informed questions about the team, data platform challenges, and technical direction. Demonstrate genuine interest in Amazon's mission and scale. Be honest about your experience level. Research the role and team beforehand. Have your resume accessible and be ready to discuss career transitions. Mention alignment with Amazon Leadership Principles naturally in conversation.
Focus Topics
Informed Questions About Role and Team
Ask 2-3 thoughtful questions: What are the main data platform challenges the team is solving? What's the current technical stack and evolution plans? How does this role contribute to Amazon's broader data strategy? What does success look like in the first 6 months?
Practice Interview
Study Questions
Amazon Leadership Principles Alignment
Research all 16 Leadership Principles. Prepare examples showing Customer Obsession, Ownership, Deliver Results, and Invent and Simplify. Naturally mention how your work embodies these principles. Focus on ownership and results-orientation.
Practice Interview
Study Questions
Role Understanding and Motivation
Demonstrate clear understanding that the role focuses on building data infrastructure, ETL pipelines, and data platforms that enable data scientists and analysts. Explain why you're drawn to this infrastructure-focused work versus analytics or science. Express enthusiasm for Amazon's scale and technical challenges.
Practice Interview
Study Questions
Background and Data Engineering Experience
Provide a concise 2-3 minute overview of your 5+ years as a data engineer, highlighting progression to senior-level work. Focus on complexity of systems you've built, team leadership, and measurable business impact. Include experience with big data technologies, cloud platforms, and data warehousing.
Practice Interview
Study Questions
AWS and Big Data Technology Expertise
Discuss hands-on experience with AWS services (S3, Redshift, EMR, Glue, Lambda, Kinesis) and big data frameworks (Spark, Hadoop). Mention specific projects where you applied these technologies. Show breadth across data pipeline components.
Practice Interview
Study Questions
Technical Phone Screen - SQL and Coding
What to Expect
This 45-60 minute technical phone screen evaluates your SQL proficiency and coding ability under time pressure. You'll receive 1-2 real-world data problems requiring SQL queries to manipulate, aggregate, and analyze data at scale. Expect questions involving intermediate-to-advanced SQL: joins, window functions, CTEs, subqueries, aggregations, and optimization strategies. Some interviews include a light Python/Java component for data transformation logic. The interviewer assesses both correctness and your ability to optimize queries for performance, communicate your reasoning, and handle edge cases. This is your first technical assessment with Amazon.
Tips & Advice
Before coding, clarify requirements, data volume, performance expectations, and edge cases with the interviewer. Write a straightforward solution first, then optimize. Explain your approach as you code—interviewers value communication over speed. Consider performance implications: indexes, join order, data types, and whether to denormalize. For coding tasks, write clean, modular Python with error handling and comments. Test your logic mentally against edge cases (NULLs, empty results, duplicates). Practice on Interview Query and LeetCode SQL medium-hard problems. If stuck, explain your thought process rather than staying silent. Ask for hints. For senior roles, interviewers expect sophisticated optimization thinking and awareness of distributed query execution.
Focus Topics
Edge Cases and Error Handling
Consider NULL values, empty datasets, duplicate records, data type mismatches, and boundary conditions. Implement defensive programming: validate inputs, handle errors gracefully, use appropriate exceptions. Test edge cases mentally before submitting.
Practice Interview
Study Questions
Performance Analysis and Communication
Articulate time and space complexity. Explain query execution plans and why indexes help. Discuss scaling with data volume. Communicate reasoning clearly to the interviewer. Justify trade-offs: 'I'm using a hash join instead of nested loop because data volume is 100M records.'
Practice Interview
Study Questions
Python or Java for Data Transformation
Write production-quality Python or Java for data manipulation. Include proper error handling, logging, and code comments. Demonstrate knowledge of Pandas (DataFrames, groupby, merges) or Spark for distributed processing. Handle edge cases in code.
Practice Interview
Study Questions
Advanced SQL Query Optimization
Master complex SQL for billion-record datasets: window functions (ROW_NUMBER, DENSE_RANK, LAG, LEAD, SUM OVER), CTEs with multiple references, self-joins, and multi-table joins. Understand query execution plans, index strategies (composite indexes, partial indexes), and when to use covering indexes. Optimize join order and predicate pushdown.
Practice Interview
Study Questions
Real-world Business Problem Solving with SQL
Apply SQL to realistic Amazon scenarios: customer order analysis (top customers, purchase frequency, lifetime value), user retention calculations, engagement metrics, cohort analysis, and data quality validation. Translate business logic into correct SQL. Handle time-series data and aggregations across dimensions.
Practice Interview
Study Questions
Technical Phone Screen - System Design
What to Expect
This 45-60 minute phone screen tests your ability to design large-scale data systems and architectures. You'll receive scenarios such as: design a real-time metrics pipeline for video streaming, build a data warehouse for retail analytics, create a distributed event-driven data lake, or design a fraud detection system processing millions of transactions. You must approach systematically: clarify requirements, propose architecture with clear layers (ingestion, processing, storage, consumption), select appropriate AWS services, discuss consistency models, ensure reliability at scale, and articulate trade-offs. This round evaluates your architectural thinking and AWS expertise.
Tips & Advice
Start by asking clarifying questions: data volume/velocity, latency requirements, consistency needs, query patterns, expected growth, and compliance constraints. Break design into layers and propose concrete AWS services for each layer. For senior roles, go deep on trade-offs and justify decisions. Example: 'I'm using S3 + Athena instead of Redshift for analytics because query latency requirements are 30 seconds, not 2 seconds, and this saves 60% on compute costs.' Discuss data quality validation, monitoring, and alerting strategies. Address scalability: how does the system perform at 10x current load? Consider security, compliance, and governance. Sketch architecture if possible. Be prepared to defend choices and adapt based on new requirements. Senior engineers should discuss operational burden, team scalability, and long-term maintainability. Mention specific AWS services: Kinesis/Firehose for ingestion, Lambda for lightweight transforms, Glue for orchestration, S3 for data lake, Redshift for warehouse, EMR for Spark jobs.
Focus Topics
Event-Driven Architecture and Streaming
Design systems handling continuous data streams. Understand event-driven patterns, stream processing windows (tumbling, sliding, session), late-arriving data handling, and exactly-once semantics. Apply Kafka, Kinesis, or Firehose. Discuss Spark Streaming or Flink if relevant.
Practice Interview
Study Questions
Cost Optimization and Scaling Planning
Design architectures considering operational costs. Propose strategies: reserved capacity, spot instances, data tiering (hot/warm/cold storage), compression, and partitioning efficiency. Balance cost with performance and reliability. Plan resource utilization for growth scenarios.
Practice Interview
Study Questions
Data Quality, Validation, and Monitoring
Design data quality frameworks: schema validation, completeness checks, uniqueness constraints, business rule validation, and statistical anomaly detection. Plan monitoring and alerting for pipeline health. Discuss how to detect and handle quality failures without blocking downstream consumers.
Practice Interview
Study Questions
Distributed Systems Concepts and Trade-offs
Understand CAP theorem, eventual vs. strong consistency, data partitioning strategies, replication approaches, and fault tolerance. Apply these concepts to architecture decisions. Discuss when to accept eventual consistency for latency gains vs. requiring strong consistency for correctness.
Practice Interview
Study Questions
Large-Scale Data Pipeline Architecture
Design end-to-end pipelines handling billions of events daily. Choose batch vs. real-time vs. hybrid approaches. Specify data sources, transformation logic, storage tiers, and consumption patterns. Address exactly-once vs. at-least-once semantics. Design for both operational and analytical workloads.
Practice Interview
Study Questions
AWS Data Services Expertise
Deep knowledge of AWS services: S3 (data lakes, partitioning, lifecycle policies), Redshift (data warehouses, distribution keys), EMR (Hadoop/Spark clusters), Kinesis (streaming ingestion), Firehose (buffered ingestion), Glue (ETL and metadata), Lambda (serverless compute), Step Functions (workflow orchestration), and DynamoDB (NoSQL). Know when to use each and their trade-offs.
Practice Interview
Study Questions
Onsite Round 1 - SQL and Data Modeling
What to Expect
During this 60-minute onsite interview, you'll work with an interviewer on complex SQL and data modeling problems. Expect intermediate-to-advanced SQL questions: multiple joins, window functions, CTEs, subqueries, and optimization strategies. You'll also work on designing database schemas for business scenarios: building a customer address tracking system, modeling a retail store's operations, or designing a data warehouse for analytics. The interviewer evaluates your SQL proficiency, schema design thinking, and understanding of how schema design impacts query performance and long-term maintainability. For senior roles, you must justify design decisions and discuss scalability to petabyte volumes.
Tips & Advice
For SQL problems, understand the data schema and requirements first. Write a solution, test mentally against examples, then optimize. Discuss index strategies and query execution plans. For schema design, ask clarifying questions about query patterns, data volume, and growth expectations before designing. Sketch the schema and explain normalization decisions. For senior roles, justify architectural choices: 'I chose star schema over snowflake because 80% of our queries are analytical (few joins, many aggregations).' Discuss slowly changing dimensions (SCD types) for temporal data. Walk through how your design scales to petabytes. Address trade-offs between normalized (data integrity, storage efficiency) and denormalized (query speed, maintenance complexity) approaches. Mention specific AWS services: Redshift for data warehouse, RDS for operational databases.
Focus Topics
Real-world Amazon Business Problem Modeling
Model realistic Amazon scenarios: customer transactions and orders, product catalog and inventory, user engagement metrics, seller performance tracking, supply chain data. Translate complex business logic into efficient schema designs.
Practice Interview
Study Questions
Query Performance Optimization
Optimize queries for large datasets: index strategies (B-tree, hash, composite indexes), query execution plans and cardinality estimation, join order optimization, predicate pushdown, partitioning for query efficiency. Know when denormalization improves performance and when it doesn't.
Practice Interview
Study Questions
Normalization and Denormalization Trade-offs
Understand database normalization (1NF through 3NF) and when to normalize for data integrity vs. denormalize for query performance. Discuss OLTP normalization vs. OLAP denormalization. Make informed trade-offs between consistency, performance, and storage.
Practice Interview
Study Questions
Data Warehouse Schema Design
Design schemas for analytical workloads: fact and dimension tables, grain specification, slowly changing dimensions (SCD types 1, 2, 3), and star vs. snowflake models. Understand when each schema type optimizes for query performance vs. storage efficiency. Design denormalized schemas for fast analytics.
Practice Interview
Study Questions
Complex SQL Queries and Window Functions
Master advanced SQL: window functions (ROW_NUMBER, RANK, DENSE_RANK, LAG, LEAD, running totals, moving averages), CTEs with recursion, complex joins (inner, left, right, full outer, cross), correlated subqueries, and aggregations with HAVING. Solve multi-step analytical problems.
Practice Interview
Study Questions
Onsite Round 2 - System Architecture Design
What to Expect
This 60-minute onsite round tests your ability to design production-grade data systems at large scale. You'll be asked to design systems like: a real-time metrics pipeline (similar to Prime Video analytics), a streaming event-driven data lake, a fraud detection system processing millions of transactions, or a metrics platform for distributed systems monitoring. You must approach systematically: clarify requirements and constraints, propose architecture with clear layers (ingestion, processing, storage, consumption), select appropriate AWS services with justification, discuss data consistency models, ensure reliability and fault tolerance, and articulate trade-offs between latency, throughput, consistency, and cost. This evaluates your architectural thinking for mission-critical systems.
Tips & Advice
Begin by asking clarifying questions: data volume, velocity, latency requirements, consistency requirements, growth expectations, compliance needs, and query patterns. Break the architecture into clear layers and propose specific AWS services for each. For senior roles, demonstrate sophisticated trade-off thinking: 'I'm choosing Kinesis over Kafka because we value AWS-managed operations over maximum flexibility, and this reduces operational overhead by 50%.' Discuss data quality validation, comprehensive monitoring, and alerting strategies. Address scalability scenarios (10x growth, geographic expansion). Consider security, compliance, and data governance. If possible, sketch the architecture. Be ready to adapt your design based on new requirements or constraints introduced by the interviewer. Senior engineers should discuss operational burden, enabling team self-service, and long-term maintainability. Reference specific AWS components: Kinesis Firehose for buffered ingestion, Lambda for transformations, Glue for orchestration, S3 for data lake, Redshift for warehouse, EMR for Spark, Step Functions for workflows.
Focus Topics
Real-time vs. Batch Processing Architecture
Understand when to use batch processing (daily/hourly jobs), real-time streaming (seconds latency), or hybrid approaches (lambda architecture with batch + real-time, kappa architecture for real-time only). Design appropriate processing pipelines based on latency and consistency needs.
Practice Interview
Study Questions
Cost Optimization and Resource Planning
Design architectures considering total cost of ownership. Propose cost optimization strategies: reserved capacity, spot instances, data tiering (hot/warm/cold), compression, efficient partitioning. Plan resource utilization for anticipated growth.
Practice Interview
Study Questions
Data Consistency, Reliability, and Fault Tolerance
Design for reliability: data replication, redundancy, failover mechanisms, disaster recovery. Implement appropriate consistency models (strong vs. eventual). Plan monitoring and alerting for failure detection. Design recovery procedures and RTO/RPO requirements.
Practice Interview
Study Questions
Partitioning, Sharding, and Data Distribution Strategies
Design effective data partitioning: by time, geography, customer, product, or hash-based. Understand trade-offs of different schemes. Apply to both storage (S3 prefix hierarchies, Redshift distribution keys) and processing (Spark partitioning). Avoid hotspots and skew.
Practice Interview
Study Questions
AWS Data Infrastructure Services
Expert knowledge of AWS stack: S3 (data lakes, partitioning strategies, lifecycle policies), Redshift (data warehousing, distribution/sort keys, compression), EMR (Spark, Hadoop, Presto), Kinesis (streaming ingestion), Firehose (buffered delivery), Glue (ETL, metadata catalog, schema registry), Lambda (serverless transforms), Step Functions (orchestration), DynamoDB (NoSQL), RDS (SQL databases). Know performance characteristics, cost profiles, and when to use each.
Practice Interview
Study Questions
End-to-End Data System Architecture at Scale
Design production systems handling petabytes of data and billions of events. Define ingestion, storage, processing, and consumption layers. Select appropriate technologies. Address scalability, reliability, operational efficiency, and monitoring. Design for both real-time and batch workloads if applicable.
Practice Interview
Study Questions
Onsite Round 3 - ETL and Data Pipeline Design
What to Expect
This 60-minute round focuses on your hands-on expertise in designing and building production ETL pipelines and data orchestration systems. You'll discuss approaches to extracting data from diverse sources, transforming it reliably, and loading into target systems. Topics include designing Python or Java ETL jobs using Spark, implementing comprehensive data quality validation, scheduling and monitoring pipelines, handling failure scenarios, and optimizing for performance. You may sketch an ETL design for a business scenario (retail transactions, log analysis, clickstream data) or discuss building a data ingestion system from scratch. The interviewer evaluates your practical pipeline engineering skills and understanding of operational considerations.
Tips & Advice
Start by understanding source data characteristics, transformation requirements, and target system specifications. Design the ETL flow: specify source connectors, transformation logic, error handling, and loading strategies. For senior roles, emphasize data quality validation: what checks are needed? How to detect anomalies? Plan using AWS Glue for orchestration, Lambda for lightweight transforms, or Spark for complex processing. Discuss idempotency and exactly-once semantics—critical for data integrity. Address data quality failures: should pipeline fail or quarantine bad data? Write example code in Python/PySpark demonstrating transformations. Discuss monitoring and alerting: how would you detect pipeline failures? Plan recovery and retry logic. For governance, mention metadata management, data lineage tracking, and documentation. Senior engineers should discuss operational aspects: scaling with data growth, enabling analytics teams for self-service, operational runbooks, and long-term maintenance.
Focus Topics
Data Ingestion Systems and Connectors
Design data ingestion from diverse sources: relational databases (change data capture, incremental loads), APIs (pagination, rate limiting), message queues (Kafka, SQS, Kinesis), files (S3, SFTP), and Hadoop ecosystems. Handle schema evolution, full vs. incremental processing.
Practice Interview
Study Questions
Error Handling, Monitoring, and Data Governance
Implement robust error handling: retry logic with exponential backoff, dead-letter queues for failures, recovery mechanisms. Design monitoring and alerting for pipeline health. Include data lineage tracking, metadata management, and compliance governance. Document data contracts.
Practice Interview
Study Questions
Apache Spark for Distributed Data Processing
Master Spark/PySpark for large-scale transformations: RDD, DataFrame, and Dataset APIs. Understand lazy evaluation and physical execution plans. Apply optimization: reducing shuffle operations, broadcast joins, proper caching, and memory tuning. Tune Spark for cluster size and data volume.
Practice Interview
Study Questions
AWS Data Pipeline Orchestration and Services
Deep knowledge of AWS Glue for scheduling and orchestrating ETL jobs, Lambda for lightweight transformations and triggers, and Step Functions for complex workflow coordination. Understand job scheduling, error handling, retry logic, and notification strategies. Design resilient, maintainable pipelines.
Practice Interview
Study Questions
Comprehensive Data Quality Framework
Design data quality checks: schema validation, completeness (NULL checks), uniqueness constraints, referential integrity, business rule validation, statistical anomaly detection, and duplicate detection. Implement checks at multiple pipeline stages. Plan handling of quality failures: fail fast vs. quarantine vs. alert.
Practice Interview
Study Questions
ETL Pipeline Design and Implementation
Design end-to-end ETL: extract from diverse sources (APIs, databases, files, Kafka), transform per business logic, validate data quality, and load into target systems (data lake, warehouse, operational store). Implement using Spark, Glue, or custom Python. Handle both batch and streaming ETL.
Practice Interview
Study Questions
Onsite Round 4 - Behavioral and Leadership Principles
What to Expect
During this 45-60 minute round, an interviewer assesses how well you embody Amazon's Leadership Principles and your fit with Amazon's culture. You'll discuss real past experiences where you demonstrated principles like Customer Obsession, Invent and Simplify, Deliver Results, Ownership, Earn Trust, and others. The interviewer uses the STAR method (Situation, Task, Action, Result) to evaluate responses. For senior roles, emphasis is on strategic thinking, influence across teams, mentoring and developing junior engineers, and contribution to team direction. Discuss how you handle ambiguity, drive technical decisions, and build consensus with stakeholders.
Tips & Advice
Study Amazon's 16 Leadership Principles in depth and prepare 1-2 strong examples for each, focusing on principles most relevant to data engineering and your senior role. Use the STAR method religiously: Situation (context), Task (what needed to be done), Action (what you specifically did, emphasizing your role and decisions), Result (quantified impact). For senior roles, discuss influence and mentoring: 'I mentored 3 junior engineers, and two were promoted to mid-level' or 'I led cross-functional alignment on a critical architecture decision.' When discussing failures, emphasize learning and application of lessons. Show customer-centric thinking: explain how your work impacted users or internal stakeholders. Demonstrate ownership with phrases like 'I took ownership,' 'I didn't wait,' 'I drove the initiative.' For ambiguity questions, walk through your decision-making process: gathered information, consulted stakeholders, made a decision with incomplete information, adapted as you learned. Be specific—avoid generic examples. Practice with Interview Query or similar platforms. Review Blind and Levels.fyi for example questions.
Focus Topics
Mentoring, Team Development, and Cross-Functional Leadership
For senior roles, discuss how you've mentored junior engineers, helped teammates grow, led initiatives across teams, built alignment on technical decisions, and developed team capabilities. Share specific examples: 'I mentored X engineer who was later promoted,' 'I led architecture design that unified three teams' data pipelines.'
Practice Interview
Study Questions
Amazon Leadership Principle: Invent and Simplify
Share examples of simplifying complex systems or processes. Describe innovative solutions to data engineering challenges. Show how you balance innovation with pragmatism. Discuss a time you challenged the status quo and improved systems.
Practice Interview
Study Questions
Handling Ambiguity and Making Decisions with Incomplete Information
Describe a situation where requirements were unclear or information incomplete. Explain your decision-making process: how you gathered input from stakeholders, consulted experts, made decisions despite uncertainty, and adapted as you learned more. Show comfort with ambiguity.
Practice Interview
Study Questions
Amazon Leadership Principle: Customer Obsession
Demonstrate how you prioritize customer (internal or external) needs and work backward from their problems. Share examples where understanding customer requirements shaped your data engineering decisions. Discuss how data infrastructure you built directly improved customer experience or internal team efficiency.
Practice Interview
Study Questions
Amazon Leadership Principle: Deliver Results
Share specific examples where you delivered high-quality results under time pressure or challenging conditions. Quantify outcomes: 'reduced query latency by 40%,' 'scaled pipeline from 1M to 50M events/day in 6 weeks,' 'shipped data warehouse feature on schedule despite resource constraints.'
Practice Interview
Study Questions
Amazon Leadership Principle: Ownership
Provide concrete examples where you took ownership of a problem end-to-end without being asked. Discuss how you felt accountable for outcomes and didn't pass responsibility to others. Share a story of taking initiative to solve a critical problem.
Practice Interview
Study Questions
Onsite Round 5 - Bar Raiser Round
What to Expect
The Bar Raiser is a senior or staff-level engineer (not on the hiring team) who conducts a 60-minute evaluation assessing your long-term potential, consistency with Amazon's highest hiring standards, and readiness for senior-level impact. This round may include a novel or particularly challenging technical problem, open-ended system design scenario, or sophisticated coding challenge. The Bar Raiser evaluates your problem-solving approach, how you structure thinking, ability to handle ambiguity, and communication of complex ideas. They assess growth potential and whether you'll contribute positively to Amazon's technical culture over years, not just immediate project impact.
Tips & Advice
Expect this round to be less predictable and potentially more challenging than previous technical rounds. The Bar Raiser may introduce mid-interview constraints or new requirements to see how you adapt. Approach novel problems systematically: ask clarifying questions, define scope, propose a solution, then iterate based on feedback. Focus on your problem-solving process rather than immediately jumping to answers. Explain trade-offs clearly and be willing to discuss why you chose one approach over another. If unsure about something, acknowledge it honestly and reason through it—intellectual humility is valued. Discuss how your approach scales beyond the immediate problem and benefits others. For senior roles, think about organizational impact: how would this scale across teams? How would you design so others can build on it? Be prepared to respectfully defend decisions and to change your mind if presented with good counter-arguments. The Bar Raiser values growth mindset, analytical rigor, and long-term thinking.
Focus Topics
Organization-Wide Impact and Scaling Thinking
Consider how technical decisions impact broader organization. Design systems others can extend and build on. Think about team scalability: how would this enable other engineers to contribute? Discuss long-term maintainability and knowledge sharing.
Practice Interview
Study Questions
Handling Ambiguity and Adaptive Problem-Solving
Respond positively to unexpected mid-interview constraints or requirement changes. Adapt your solution thoughtfully. Show flexibility in thinking while maintaining sound technical judgment. Demonstrate comfort with iterative refinement.
Practice Interview
Study Questions
Clear Communication of Complex Technical Ideas
Explain complex technical concepts clearly to the interviewer. Use diagrams, analogies, or examples when helpful. Avoid unnecessary jargon or explain clearly when needed. Ensure the interviewer follows your reasoning and can challenge your thinking productively.
Practice Interview
Study Questions
Intellectual Honesty, Growth Mindset, and Adaptability
Acknowledge what you don't know and reason through unknowns. Be willing to change your mind when presented with compelling evidence or alternatives. Discuss learning from past mistakes and how they shaped your approach. Show comfort with evolution of thinking.
Practice Interview
Study Questions
Advanced Problem-Solving and Systems Thinking
Demonstrate deep problem-solving ability on novel or complex scenarios. Break problems into manageable components. Think systematically about dependencies, constraints, and trade-offs. Propose solutions that are elegant, scalable, and maintainable. Consider multiple approaches before committing.
Practice Interview
Study Questions
Architectural Judgment and Multi-dimensional Trade-offs
Make informed architectural decisions balancing consistency vs. availability, latency vs. throughput, cost vs. performance, complexity vs. maintenance burden. Clearly articulate trade-offs and under what conditions your decisions would change. Show sophistication in trade-off analysis.
Practice Interview
Study Questions
Frequently Asked Data Engineer Interview Questions
You need to convince leadership to sunset or pause something they still believe in, a decade-old system, a launch under regulatory pressure, or a feature that's already shipped and generating revenue, because you believe the technical or ethical risk outweighs the upside. How do you build that case, and how do you handle it if they push back with a business argument you can't fully counter?
Sample Answer
Direct answer
Build the case on the specific, evidenced risk, not on general discomfort with the status quo, and bring a plan for the transition, not just an argument for stopping. When leadership pushes back with a business argument you genuinely cannot fully counter, for example real revenue currently tied to the thing you want to sunset, don't try to win the argument outright: shrink the ask to something they can say yes to, a bounded pilot, a partial rollback, or an explicit, documented risk acceptance with a named owner and a revisit date, so the risk becomes a managed, visible decision instead of a debate you lose and the risk disappearing from view.
Structured elaboration
- Ground the case in specific evidence, not a general sense that something old or risky should go. Usage data, cost trend, incident history, or a concrete compliance exposure. "This system is a decade old" is not a reason to sunset it; "it has caused three incidents this year and its underlying dependency reaches end-of-support in six months" is.
- Separate the technical/ethical risk from the business value it currently generates, and be honest that both are real. A feature that is generating revenue while carrying real risk is a genuine trade-off, not a case where one side is simply wrong; pretending otherwise makes your case less credible, not more.
- Bring a transition plan, not just a stop request. Leadership is far more willing to act on risk when the ask includes how affected users or revenue are protected during the transition: a migration path, a parallel run, or a phased reduction rather than an abrupt cutoff.
- When you hit a business argument you cannot fully counter, do not manufacture a counter-argument you don't actually believe. Instead:
- Shrink the ask. Propose a bounded pilot or a partial mitigation (reduce blast radius, add a specific control) rather than full sunset, so leadership can say yes to something real without betting the whole revenue line.
- Make the residual risk an explicit, named decision, not a default. Write down what risk is being accepted, why, and who is accepting it. This is not a threat, it's honesty: if the risk materializes, everyone remembers it was a deliberate, informed call, not something nobody flagged.
- Set a concrete revisit trigger. A specific metric, incident, or date that reopens the decision, so "we'll look at it later" has an actual mechanism instead of quietly becoming never.
- Escalate on the evidence, not on your own certainty. If you still believe the risk outweighs the upside after making the strongest possible case, escalating with the documented evidence and the accepted-risk record is legitimate; escalating on "I really think I'm right" without new evidence usually just burns trust.
This same structure applies whether the thing at risk is a decade-old reporting suite with real dependents, a legacy model integrated into multiple downstream systems, a launch the CEO wants to keep on schedule that you believe needs delay to implement proper ML governance first, a launch a fairness analysis flagged for disparate impact despite executive pressure to proceed, an LLM feature with a known hallucination risk, a cross-functional analytics program an executive wants to cancel under budget pressure, a fraud-reduction change business leaders want reverted because it dented revenue, a product pivot that trades short-term revenue for long-term retention, pushing back on a business request because of a genuine technical risk, a newly discovered regulatory risk you need to present to legal, product, and executives together, a new regulation requiring data-lineage controls that collides with leadership's push for a fast end-of-year dashboard rollout, re-planning a long-running AI platform initiative after its funding is put at risk mid-flight, a regulated launch on a hard deadline carrying a small residual failure-mode risk that could trigger fines, and product leadership pushing for rapid launches despite reliability concerns you have already raised: name the specific evidence, separate the real value from the real risk, and bring a transition path rather than a bare stop request.
Worked example
A ten-year-old reporting suite was costing real money to run and had low measured active use, but it was still the system of record for a handful of teams, including one that used it to produce a report tied to a partner contract. Leadership's pushback was fair: "this system generates a report our biggest partner relies on, and you're asking us to touch it." I could not fully counter that; the report genuinely mattered and I had no way to guarantee a migration would be flawless.
Instead of pushing for a full sunset, I shrank the ask to a bounded pilot: migrate the three lowest-risk, lowest-usage reports first, run them in parallel with the legacy system for a defined period, and only propose migrating the partner-facing report once that pilot showed the pattern worked. I also wrote down explicitly what we were accepting by not touching the partner report yet: continued maintenance cost on the whole legacy platform until that piece migrated, with the CFO as the named owner of that trade-off since it was their budget line funding the extra maintenance cost. We set a revisit date six weeks after the pilot to decide on the partner report specifically, rather than leaving it indefinitely deferred.
The pilot succeeded on the three lower-risk reports, which gave leadership real evidence (not a projection) that the migration pattern worked, and that evidence, not a stronger argument, is what got the partner-facing report onto the roadmap the following quarter.
Trade-offs and pitfalls
- Treating every pushback as something to argue past rather than something to actually listen to means you sometimes push to sunset something that genuinely should stay; the business argument you can't counter is sometimes correct.
- A documented risk-acceptance record can read as covering yourself rather than as genuine transparency if you only produce one after losing an argument; make it a habit for any accepted risk, not just the ones where you disagreed.
- Shrinking the ask repeatedly without ever closing the loop on the deferred, higher-risk piece just delays the real decision indefinitely; the revisit trigger has to be a real date or metric, not a soft "later."
- Escalating too early, before you've built the evidence base, reads as going over someone's head rather than raising a legitimate concern; escalation works when it's backed by data leadership hasn't seen, not by repetition of the same argument louder.
Write a query to find users who placed at least 3 orders in the last 12 months and whose average order value is above a given amount. Given orders(order_id, user_id, amount_cents, created_at), return the qualifying user_ids.
Sample Answer
Direct answer
Filter orders to the last 12 months, group by user_id, and use HAVING to require both COUNT(*) >= 3 and an average-order-value threshold, computed as AVG(amount_cents) / 100.0 since the amount is stored in cents. Both conditions are aggregate conditions, so both belong in HAVING, joined with AND.
Approach
- Filter to the relevant window first (
WHERE created_atin the last 12 months), so only recent orders count toward frequency and AOV. - Group by
user_id. - In HAVING, require
COUNT(*) >= 3for frequency andAVG(amount_cents) / 100.0 > thresholdfor average order value, in the same clause since both are per-group aggregate conditions.
Worked example (sqlite3, verified)
Sample data (reference "now" pinned to 2024-04-01, so the last 12 months = [2023-04-01, 2024-04-01)):
CREATE TABLE orders (order_id INTEGER PRIMARY KEY, user_id INTEGER, amount_cents INTEGER, created_at TEXT);
INSERT INTO orders VALUES
(1, 1, 6000, '2024-01-05'),
(2, 1, 5500, '2024-02-10'),
(3, 1, 7000, '2024-03-01'), -- user 1: 3 orders, AOV ~= $61.67
(4, 2, 2000, '2024-01-15'),
(5, 2, 1500, '2024-02-20'),
(6, 2, 1000, '2024-03-05'), -- user 2: 3 orders, AOV = $15.00 (fails threshold)
(7, 3, 9000, '2024-01-01'),
(8, 3, 8000, '2024-02-01'), -- user 3: only 2 orders (fails count)
(9, 4, 12000, '2023-01-01'); -- user 4: outside the 12-month window
Query, at least 3 orders in the window and AOV above $50:
SELECT user_id, COUNT(*) AS order_count, AVG(amount_cents) / 100.0 AS aov_usd
FROM orders
WHERE created_at >= '2023-04-01' AND created_at < '2024-04-01'
GROUP BY user_id
HAVING COUNT(*) >= 3 AND AVG(amount_cents) / 100.0 > 50
ORDER BY user_id;
Result: exactly 1 row, (1, 3, 61.666666666666664).
Full per-user breakdown (no HAVING filter, to show why each other user was excluded):
SELECT user_id, COUNT(*) AS order_count, AVG(amount_cents) / 100.0 AS aov_usd
FROM orders
WHERE created_at >= '2023-04-01' AND created_at < '2024-04-01'
GROUP BY user_id
ORDER BY user_id;
Result: (1, 3, 61.67), (2, 3, 15.0), (3, 2, 85.0). User 2 has enough orders (3) but fails AOV ($15 < $50). User 3 clears AOV easily ($85) but only has 2 orders, failing the count threshold. User 4's single order predates the window entirely and never appears in either result.
Key points
- Both filter conditions on the group (order count, AOV) are aggregate conditions, so both must be in HAVING; there's no valid way to express either one in WHERE.
- Storing money in cents and dividing by 100.0 in the SELECT (not earlier) avoids integer-division truncation in engines where integer/integer division floors the result;
100.0forces floating-point division. - The date filter in WHERE happens before grouping, which is both correct (it must, since "last 12 months" is a per-row property, not a per-user aggregate) and efficient (fewer rows reach GROUP BY).
Complexity, edge cases & pitfalls
- An index on
(user_id, created_at)lets the engine narrow to each user's recent orders efficiently before aggregating; without it, this query does a full scan oforders. - If
amount_centscan be NULL for some rows,AVGsilently ignores those rows rather than erroring, which quietly changes both the order count used for HAVING's COUNT(*) (still counts the row) and the AOV (excludes it), a subtle mismatch worth guarding withWHERE amount_cents IS NOT NULLif NULL amounts are a data quality issue rather than a valid zero-dollar order. - The "last 12 months" boundary is a common off-by-one risk: this answer defines it as
[2023-04-01, 2024-04-01), a full rolling year ending the day before the reference date; using>=on the lower bound and strict<on the upper bound (rather than<=on a date that might include a partial day) avoids double-counting the boundary day. - Requiring
COUNT(*) >= 3in the same window as the AOV means a user just barely at 3 orders has their average pulled by exactly those 3 values, small samples can look extreme; that's expected here and worth flagging to a stakeholder if the tier is meant to reward high-value repeat customers rather than accidentally reward small-sample noise.
How does partition pruning and predicate pushdown reduce the amount of data scanned by queries? Provide an example SQL/DataFrame query and Parquet partitioning scheme where pruning avoids scanning large partitions, and explain common reasons pruning fails (non-deterministic expressions, functions on partition columns).
Sample Answer
Direct answer
Partition pruning skips entire directories (partitions) whose partition-column value cannot satisfy a query's filter, without opening a single file inside them; predicate pushdown goes further WITHIN the files that ARE read, using Parquet's own per-row-group statistics (min/max values, and null counts) to skip entire ROW GROUPS that cannot match the filter, without decompressing or scanning their actual row data. The common reasons pruning fails differ by WHICH mechanism is involved, and are worth naming precisely rather than lumped together: predicate pushdown is reliably defeated by wrapping the filtered column in a function (confirmed directly below), while partition pruning is more resilient to that specific pattern than commonly assumed, since it evaluates predicates against the already-enumerated partition VALUES rather than against file statistics; genuinely non-deterministic expressions defeat both.
Structured elaboration
Partition pruning mechanics. A table physically laid out as s3://bucket/orders/order_date=2026-07-01/, order_date=2026-07-02/, etc. (Hive-style partition directories) lets Spark's planner read the PARTITION VALUES directly from directory NAMES (no file content needs to be touched at all), decode them into typed values, and evaluate a query's filter EXPRESSION against those already-decoded values in memory, listing only the directories whose value satisfies it; a query filtering WHERE order_date = '2026-07-15' against 2 years of daily partitions (roughly 730 directories) reads exactly 1, entirely from directory-name comparison.
Predicate pushdown mechanics. WITHIN the (already partition-pruned) set of files that must be opened, columnar formats like Parquet store PER-ROW-GROUP statistics (min/max value, and null count, for each column) in the file's own footer metadata; for pushdown to engage, Spark's planner must be able to express the filter as one of a SPECIFIC, LIMITED set of pushable filter shapes (equality, range comparisons, IN-lists, IS NULL, directly against a raw column) that the Parquet reader's stats-based filter understands; when it can, an entire row group is skipped ENTIRELY (no decompression, no row-by-row scan) whenever the filter's value falls outside that row group's min/max range.
Common reasons pruning fails, MEASURED rather than assumed. I initially drafted this section from a simplified mental model (that wrapping either a partition or a pushdown column in a function defeats pruning identically) and did not ship it without checking; running both cases against a real partitioned Parquet table showed the two mechanisms behave DIFFERENTLY under the identical pattern:
- Predicate pushdown IS defeated by a function wrapped around the filtered column, confirmed directly (worked example below):
WHERE ROUND(amount, 0) > 150produces an EMPTYPushedFilterslist in the physical plan (the wrapped expression cannot be expressed as a pushable filter shape), falling back to evaluating it as aDataFilterafter decompressing and reading every row, while the directWHERE amount > 150showsPushedFilters: [GreaterThan(amount,150.0)]engaged. - Partition pruning is MORE RESILIENT to a function wrap than commonly assumed, also confirmed directly:
WHERE dayofmonth(order_date) = 3STILL appears insidePartitionFiltersin the physical plan and correctly prunes to only the matching directories, because the planner evaluates the wrapped expression against each partition's small, already-enumerated set of decoded values (cheap, since there are typically far fewer distinct partitions than rows), rather than needing to invert the function symbolically the way row-group-statistics-based pushdown would. - Genuinely non-deterministic expressions defeat BOTH mechanisms.
WHERE order_date = current_date() - 1depends on WHEN the query runs, not a fixed value the planner can resolve once and compare against either partition directory names or row-group statistics; some Spark versions evaluate a non-deterministic expression once upfront and treat the result as effectively constant for that execution, but relying on that behavior rather than computing the concrete bound explicitly in application code is fragile across versions.
Worked example
from pyspark.sql import SparkSession
from pyspark.sql import functions as F
import tempfile, os
spark = SparkSession.builder.master("local[2]").appName("s90").getOrCreate()
spark.sparkContext.setLogLevel("ERROR")
tmpdir = tempfile.mkdtemp()
df = spark.createDataFrame(
[(f"2026-07-{d:02d}", i, float(i * 10)) for d in range(1, 6) for i in range(1, 21)],
["order_date", "customer_id", "amount"])
df.write.partitionBy("order_date").mode("overwrite").parquet(tmpdir)
read_back = spark.read.parquet(tmpdir)
# PARTITION pruning: direct vs. function-wrapped partition column.
part_direct = read_back.filter(F.col("order_date") == "2026-07-03")
part_wrapped = read_back.filter(F.dayofmonth(F.to_date("order_date")) == 3)
# PREDICATE PUSHDOWN: direct vs. function-wrapped non-partition column.
push_direct = read_back.filter(F.col("amount") > 150)
push_wrapped = read_back.filter(F.round(F.col("amount"), 0) > 150)
def plan_line(df, needle):
plan = df._jdf.queryExecution().simpleString()
return next(l.strip() for l in plan.split("\n") if needle in l)
print("Partition, direct :", plan_line(part_direct, "PartitionFilters"))
print("Partition, wrapped :", plan_line(part_wrapped, "PartitionFilters"))
print("Pushdown, direct :", plan_line(push_direct, "PushedFilters"))
print("Pushdown, wrapped :", plan_line(push_wrapped, "PushedFilters"))
print("\nAll four correctness-equal:",
part_direct.count() == 20, part_wrapped.count() == 20,
push_direct.count() == push_wrapped.count())
os.system(f"rm -rf {tmpdir}")
spark.stop()
Output (actually executed with python3.12 + pyspark 3.5.1, Java 17, local[2]; lines trimmed to the relevant clause):
Partition, direct : ...PartitionFilters: [isnotnull(order_date#12), (order_date#12 = 2026-07-03)]...
Partition, wrapped : ...PartitionFilters: [isnotnull(order_date#12), (dayofmonth(order_date#12) = 3)]...
Pushdown, direct : ...PushedFilters: [IsNotNull(amount), GreaterThan(amount,150.0)]...
Pushdown, wrapped : ...PushedFilters: []...
All four correctness-equal: True True True
The function-wrapped PARTITION filter still appears inside PartitionFilters and prunes correctly (20 rows either way), while the function-wrapped PUSHDOWN filter produces an EMPTY PushedFilters: [], confirmed defeated. All four queries return the CORRECT result regardless (pruning is a performance optimization, never a correctness requirement: a query that fails to prune still computes the right answer, just slower), which is exactly why this specific failure mode is invisible without checking the physical plan directly.
Trade-offs and pitfalls
- Common mistake, and the one this answer's own first draft nearly made: assuming partition pruning and predicate pushdown fail under IDENTICAL conditions because both are commonly described together as "pruning"; they are two DIFFERENT mechanisms (directory-enumeration-based versus file-statistics-based) with different resilience to a function-wrapped column, and treating them as interchangeable risks either an incorrect diagnosis in production or, as here, an incorrect claim in a design document.
- Common mistake: wrapping a NON-partition filtered column in a function out of habit (
WHERE ROUND(amount, 0) > 150instead of a direct comparison) without realizing it silently defeats predicate pushdown specifically; since the query still returns the CORRECT result either way, this defect is invisible without explicitly checkingPushedFiltersin the physical plan. - Assuming
explain()output is self-evidently clear about whether pruning engaged is itself a common mistake; the reliable signal is specifically the CONTENT ofPartitionFilters(for partition pruning) andPushedFilters(for predicate pushdown) in the physical plan, worth learning to read those two specific sections rather than skimming the plan generally or trusting a mental model not checked against the actual plan. - Predicate pushdown's row-group-skipping benefit depends on the DATA actually being somewhat SORTED or clustered by the filtered column WITHIN each file; a file whose rows are in random order relative to
amounthas row groups whose min/max ranges all overlap heavily, so few or no row groups end up skippable even when pushdown is technically engaged, a data-layout concern distinct from whether pushdown itself fired.
Design the integration layer for a company with 25 internal applications and 8 external vendors that all share customer, product, and order data. Requirements: one place to manage ownership, support for both near-real-time and batch sync, lineage you can use for audits, and minimizing point-to-point connections between systems. How would you structure the data flow and the integration boundaries?
Sample Answer
Direct answer
The way to avoid 25 x 8 point-to-point connections is a hub-shaped integration layer: every internal application and external vendor connects to ONE shared layer, not to each other directly, and that shared layer owns the canonical model, the sync mechanics, and the lineage, while individual systems only need to know how to talk to the hub.
Structured elaboration
Structuring the data flow
- A central integration layer (built on an event bus plus a set of connectors, or an iPaaS-style platform (integration platform as a service: a vendor-hosted product that ships pre-built connectors and a workflow engine so you configure integrations rather than code them from scratch), depending on scale and budget) sits between every system; a system publishes changes to the hub and consumes what it needs from the hub, never directly from another system's database or API.
- Define a canonical data model for the shared entities (customer, product, order) that every system's data is mapped into on the way in and mapped out of on the way out, so the hub, not each pairwise connection, absorbs the complexity of reconciling different systems' representations of the same entity.
Ownership
- Each canonical entity has one clearly designated owning system (the source of truth for that entity), with every other system treated as a consumer or, where genuinely necessary, a secondary contributor with an explicit conflict-resolution rule.
- The integration layer itself owns the mapping rules and the sync mechanics, but not the business data; ownership of "what is correct" stays with the source systems, ownership of "how it moves" belongs to the integration layer.
Supporting both near-real-time and batch sync
- Systems that can emit events (most modern internal apps, some vendors) integrate via the event bus for near-real-time propagation.
- Systems that cannot (older internal apps, vendors offering only file exports or low-frequency APIs) integrate via scheduled batch connectors into the same hub, landing into the same canonical model on their own cadence.
- The consuming side does not need to know or care which mechanism produced an update; it reads from the hub's canonical store either way.
Lineage for audits
- Every record moving through the hub carries provenance: which source system it came from, when it was captured, and which mapping rule transformed it into the canonical shape.
- Centralizing this in the hub, rather than expecting each of the 33 systems to independently implement its own audit logging, is what makes a company-wide audit actually answerable in one place instead of 33 separate investigations.
Minimizing point-to-point connections
- Every pair of systems that needs to exchange data would need its own direct connection without a hub; the number of possible pairs among N systems is written C(N,2) (read "N choose 2") and works out to N x (N-1) / 2, since each of the N systems can pair with N-1 others and dividing by 2 removes the double-count of listing each pair twice (once from each system's own perspective). Without a hub, the theoretical maximum of pairwise integrations among all 33 systems, since the question states all three data types are shared broadly rather than only flowing from vendor to internal app, is C(33,2) = 33 x 32 / 2 = 528, not just the 25 x 8 = 200 cross-group (internal-to-vendor) pairs alone: internal-to-internal sharing among the 25 apps adds up to C(25,2) = 300 more possible pairs, and vendor-to-vendor sharing among the 8 vendors adds up to C(8,2) = 28 more. The hub collapses all of that, cross-group and within-group alike, down to 33 connections total (one per system, in and out of the hub), which is the entire point of centralizing rather than letting teams integrate pairwise as needs arise.
- New systems joining later (a 26th internal app, a 9th vendor) need only ONE new connection to the hub, not a new connection to every existing system they might need data from.
Worked example
A new CRM vendor is being onboarded as external vendor #9. Without the hub, onboarding it would mean building point-to-point integrations to however many of the 33 other systems need customer data from it, potentially dozens of new connections. With the hub, the CRM vendor gets exactly one connector mapping its customer records into the canonical customer model, publishing changes to the hub; every one of the other 32 systems that already consumes canonical customer data from the hub automatically sees the new vendor's data with zero changes on their end, since they were never coupled to any specific source system in the first place, only to the hub's canonical shape.
Trade-offs & pitfalls
- A canonical data model is genuine, ongoing modeling work, not a one-time exercise; as new systems join with data that does not map cleanly onto the existing canonical shape, the model itself has to evolve, and that evolution needs the same schema-change discipline as any other shared contract.
- Centralizing everything into one hub creates a single dependency every system now relies on; the hub's own availability and scaling become critical-path concerns in a way that no single point-to-point connection ever was on its own.
- Not every legacy vendor will cleanly fit the hub pattern; some very old or inflexible systems may need a bespoke adapter in front of them just to get their data into a shape the hub can accept at all, and pretending otherwise just pushes the complexity into a fragile, undocumented corner.
- "One connection per system" is the right target, but it is easy to accidentally recreate point-to-point sprawl inside the hub itself if teams start building direct, hub-bypassing shortcuts "just this once" for a deadline; governance over the hub's own boundary matters as much as the initial architecture.
Rewrite a dense, jargon-heavy sentence or short paragraph into a direct, plain-language version that keeps the meaning but removes filler words and unnecessary qualifiers.
Sample Answer
Direct answer
Read the sentence for what it is actually trying to say, restate that meaning in the fewest plain words, and remove verbal padding (filler words, unnecessary qualifiers, and jargon that doesn't add precision) rather than just shortening it mechanically.
Structured elaboration
- Separate meaning from wording first. Read the sentence and paraphrase its actual point out loud in your own words before touching the original text; this stops you from just deleting words from the existing structure and instead lets you rebuild a clean sentence.
- Remove filler and hedges: "um," "like," "you know," "sort of," "basically," "at the end of the day," and throat-clearing openers ("so, I mean").
- Remove unnecessary qualifiers that soften a claim without adding real uncertainty: "kind of important," "a little bit concerning," "somewhat unclear," when the writer actually means "important," "concerning," "unclear."
- Replace jargon with the plain-language equivalent only where the jargon isn't doing real precision work; keep a technical term if a more common word would actually lose meaning.
- Prefer active voice and a direct subject-verb-object order, which is usually both shorter and clearer than passive constructions. Active voice means the subject of the sentence does the action, for example "the team shipped the fix." Passive voice flips this around so the subject receives the action instead of doing it, and often hides or drops who actually did it, for example "the fix was shipped by the team" (actor still named, but buried at the end) or "the fix was shipped" (actor dropped entirely, so the reader can't tell who's responsible).
Worked example
Original: "So, um, basically what we're trying to do here is, like, sort of make the checkout flow a little bit faster, if that makes sense, because right now it's kind of slow for some users."
Rewrite: "We're speeding up checkout. It's currently slow for some users."
Word count drops from 35 words to 10, a 71% reduction, while the two facts (goal: faster checkout; problem: currently slow for some users) both survive intact. Everything removed was filler, hedging, or a qualifier that added no information.
Trade-offs and pitfalls
- Removing every qualifier can accidentally remove real uncertainty the speaker meant to convey; "somewhat unclear" sometimes genuinely means partially unclear, not fully unclear, so check whether the hedge was doing real work before deleting it.
- Jargon isn't always the enemy: "p95 latency" (the 95th-percentile response time) is more precise than "how fast it usually is," and rewriting it away for a technical audience would lose information, not just words.
- This is a skill best practiced by rewriting your own recent messages after the fact; it is much harder to self-edit in the moment than it is with a few minutes of distance.
A read-heavy service is seeing increased database read latency during traffic spikes. Walk through how you would reduce it: what would you look at first, what would you try next, and how would you decide between the different levers available to you, spanning data-access changes, caching, and precomputation? For each option you pick, explain the trade-offs and how you would measure whether it worked.
Sample Answer
Direct answer
Work from the cheapest, most targeted fix toward the most expensive, most structural one: first confirm what is actually slow, a specific query, a specific table, or genuinely just more concurrent load than any single fix will absorb, then reach for data-access changes before caching before precomputation, because each step down that list costs more to build and adds more that can go wrong.
How to think about it
Confirm the shape of the spike first. Is latency up because query count rose (more concurrent requests, same per-query cost) or because per-query cost itself rose (a plan regression, a lock, a missing index that only bites at higher row counts)? EXPLAIN ANALYZE (runs the query for real, instead of only estimating, and reports the actual plan, timing, and row counts) on the actual slow query, and wait events in pg_stat_activity, answer this in minutes and determine which lever below is even relevant.
Data-access changes first, usually the cheapest and lowest-risk: is there a missing or unused index on the filtered or joined columns; is the query doing more work than the request needs, selecting unused columns, or issuing many small queries where one would do; is the connection pool itself the bottleneck (a connection pool is a fixed-size set of already-open database connections that requests borrow and return, instead of opening a brand new connection every time), requests queueing for a pool slot look identical to "the database is slow" from the outside, but the fix is pool sizing, not the query.
Caching next, once data-access tuning is exhausted and the same read repeats often enough to be worth it: an application-side cache in front of the hot read, sized and invalidated for that specific access pattern, trades a new consistency and invalidation surface for latency.
Precomputation last, for read shapes that are expensive no matter how well-indexed the base tables are, a cross-row aggregate, a multi-table join for a dashboard: materialize the result ahead of time so the spike-time read becomes a plain table scan, not a live computation.
For each lever, measure before and after using the same metric the spike broke, typically the 95th or 99th percentile (p95 or p99, the latency value slower than 95% or 99% of requests) latency on the affected endpoint, not a proxy metric, and confirm the fix actually moved that number under comparable load, not just in isolation.
Worked example
A real, pinned demonstration of step two done correctly, executed against a live PostgreSQL 16 instance: a 50,000-row orders table (id, customer_id, order_date, amount, status) filtered by customer_id, first with no supporting index.
Seq Scan on orders
Filter: (customer_id = 408)
Rows Removed by Filter: 49990
Buffers: shared hit=417
Execution Time: 1.022 ms
After adding a single index on that column:
CREATE INDEX idx_orders_customer_id ON orders (customer_id);
Bitmap Heap Scan on orders
Recheck Cond: (customer_id = 408)
Heap Blocks: exact=10
Buffers: shared hit=10 read=2
Execution Time: 0.035 ms
About a 35x reduction in buffer touches (417 down to 12) and a 29x reduction in execution time (1.022 ms down to 0.035 ms) on this demo's data. Those two ratios do not have to match, and here they do not: buffer touches count pages visited, execution time is wall-clock cost, and a cold-cache random-access fetch still costs more per buffer than a page the sequential scan was already streaming through. What matters for the argument is that both numbers dropped sharply once the index let the planner skip almost the entire table. This is exactly what a well-targeted data-access change looks like: cheap, no new infrastructure, and it moved the real measured numbers.
Trade-offs and pitfalls
Reaching for caching or a materialized view (a query's result saved as its own table and refreshed on a schedule, instead of recomputed on every read) before confirming the query is not just missing an index over-engineers an expensive fix for a cheap problem. Adding an index reflexively without checking its write-side cost is its own mistake, every index slows down inserts, updates, and deletes on that table and adds storage, so index the columns real queries actually filter or join on, not every column that might someday be useful. Treating "add a read replica" as a data-access fix is a category error, it is a capacity fix, more read throughput across more machines, and it does not help if the problem is a single query's per-execution cost, that same slow query just runs slowly on more machines instead of one.
Compare a traditional centralized data warehouse, where one platform team owns ingestion, modeling, and serving for the whole company, against a data mesh architecture, where each business domain owns and publishes its own analytical data as a product against company-wide interoperability standards. What specific problem is data mesh trying to solve that a well-run centralized warehouse does not already solve, what does an organization give up by adopting it, and when would you recommend against it?
Sample Answer
Direct answer
Data mesh is trying to solve an organizational bottleneck, not a technical one: in a centralized warehouse, one platform team becomes the sole gatekeeper for every domain's data, and as the company grows, that team cannot scale its domain knowledge or its throughput fast enough to keep every business unit unblocked. Data mesh fixes this by making each domain team responsible for publishing its own data as a well-defined, discoverable, quality-guaranteed "data product," coordinated only by shared interoperability standards rather than a single team's backlog. What you give up is exactly the thing centralization was good at: one team enforcing consistent modeling discipline and conformed dimensions everywhere, which a mesh instead has to achieve through governance and standards that are far easier to state than to actually enforce across many independent teams.
Structured elaboration
The problem data mesh solves. As a company adds domains (finance, marketing, logistics, each with deep, changing domain knowledge), a single centralized platform team increasingly becomes a queue: every new mart, every schema change, every new source integration waits on that one team's capacity, and that team's members are rarely domain experts in all the areas they are modeling data for. Data mesh addresses this by pushing ownership of the DATA out to the domain teams that already understand it best, while the platform team's job shifts to building and operating shared self-serve infrastructure (a common cataloging, access-control, and quality-testing layer) rather than owning every dataset itself.
What a well-run centralized warehouse already solves, and does not need mesh to fix. If an organization is small enough, or disciplined enough, that a single platform team can genuinely keep up with every domain's needs, a centralized warehouse's core advantage, one team enforcing conformed dimensions and one place to look for the "official" definition of a metric, is not a problem data mesh needs to solve, it is a benefit you would be trading away.
What you give up. Conformance discipline is the main casualty: in a centralized model, one team can simply refuse to publish a customer dimension that does not match the existing conformed one. In a mesh, each domain team owns and can independently evolve its own data product, so achieving the same cross-domain consistency requires the interoperability standards (naming conventions, shared identifiers, data contracts, quality SLAs) to be genuinely enforced, typically through automated checks in the shared platform rather than a single team's review, and that enforcement machinery is itself a significant, ongoing investment.
When to recommend against it. A small or early-stage company (the kind of organization discussed when deciding whether it needs a formal warehouse at all) does not have enough distinct domains or organizational scale for a mesh's coordination overhead to pay for itself; a single platform team can still serve everyone directly and faster than standing up domain teams and shared self-serve infrastructure would. A company without the engineering maturity to build and operate the shared interoperability platform a mesh depends on will end up with the worst of both worlds: decentralized ownership without the standards that were supposed to keep it consistent, which is functionally the four-un-conformed-dimensions governance failure, just organized around teams instead of ad-hoc mart builds.
Worked example
A company with one warehouse team serving five departments starts taking two weeks to review and approve every new mart request, and departments start building their own disconnected spreadsheets to route around the bottleneck, exactly the fragmentation a warehouse was meant to prevent in the first place. Moving to a mesh does not remove the need for a customer identifier every domain agrees on: it moves the enforcement of that agreement from "the one team reviews everything" to "the shared platform automatically validates every published data product against a data contract that specifies the agreed identifier, format, and quality checks," which only works if that contract-validation infrastructure actually gets built and maintained, not just proposed.
Trade-offs and pitfalls
The most common mistake is adopting the language of data mesh (domain ownership, data products) without building the shared self-serve platform underneath it, which produces decentralization with none of the standards enforcement that made the model viable in the literature; the result is usually worse consistency than the centralized warehouse it replaced. The second common mistake is treating this as an all-or-nothing choice: many organizations run a hybrid where a small number of genuinely cross-cutting dimensions (customer, date, product) stay centrally owned and conformed exactly as in a Kimball bus architecture, while domain-specific facts and less-shared dimensions are pushed out to domain ownership.
Tell me about a time you had to make a fast, high-stakes decision during a live incident or outage with incomplete information. Walk through the immediate steps you took, who you looped in, how you communicated the trade-offs, and how you made sure your response was safe and reversible.
Sample Answer
Use a STAR skeleton (Situation, Task, Action, Result) and fill it with a real instance, not a summary.
Situation: Name the system, the blast radius, and exactly what you didn't know yet. Example: "At 2:11am a checkout payment service's error rate jumped from a normal 0.3% to 9% within six minutes. I didn't yet know whether this was caused by our own deploy 40 minutes earlier or an upstream payment processor incident."
Task: Your accountability in the moment (on-call engineer, incident commander, the person whose page it was).
Action, addressing each part of the question:
- Immediate steps: triage first, diagnose second. Before spending time root-causing, take the smallest reversible action that stops the damage. In the example: roll back the deploy from 40 minutes earlier, because a rollback is fully reversible and returns the system to a known-good state, versus attempting a live hotfix, which is unverified and harder to undo cleanly.
- Who you looped in: name specific roles, not "the team". Payments lead (owns the affected system), customer support lead (needs to know what to tell affected customers), and an executive on-call only once a stated threshold is crossed, for example sustained revenue impact above a set dollar-per-minute bar or an error rate sustained past 10 minutes. Naming a threshold shows judgment about when a decision is above your own authority to make alone.
- How you communicated trade-offs: write the trade-off down in the incident channel with a timestamp, in one sentence: "Rolling back loses the fix from the earlier deploy but restores a known-good state; staying on the current version keeps the fix but the error rate is unacceptable, rolling back now." Stakeholders should be able to read that sentence and know exactly what was given up and why.
- How you made sure it was safe and reversible: the rollback itself was the safety mechanism (an already-tested prior version, not a new fix). After the rollback, verify recovery against a specific metric (error rate back under 0.5% within 5 minutes) before declaring the incident over, and hold a rollback-forward plan in case the assumption about the deploy being the cause was itself wrong.
Result: State the actual outcome and the follow-up (a postmortem, a change to a deploy gate or an alert threshold), so the interviewer sees the loop closed, not just that the fire went out.
The same judgment transfers outside a services context. If what's failing is a machine learning model rather than a service, for example a model suddenly producing degenerate or repeated outputs, the reversible-first instinct is the same: fail over to the last known-good model checkpoint rather than attempting an online patch to serving code, loop in the model owner and the specific downstream teams whose feature depends on it, and be explicit that the fallback uses a slightly older, slightly less accurate model, which is an acceptable known cost versus an unknown, ongoing one.
It also transfers to a stakeholder with no pager at all. A comms lead gets word an hour before a scheduled product announcement that a reporter is about to publish a story built on a factual claim the team hasn't confirmed or denied. The reversible-first move is the same shape as the rollback above: issue a brief, factual holding statement rather than a detailed rebuttal that commits to a specific version of events before it's confirmed, since a holding statement can be superseded within the hour while a wrong rebuttal has to be walked back in public. She loops in Legal and the executive sponsor once a stated threshold is crossed, for example a second outlet picks up the story or it crosses a follower-count threshold on social media, and writes the trade-off down for the exec team in one sentence: "Holding the statement costs us control of today's launch narrative but avoids responding to an unconfirmed claim; publishing a full rebuttal now risks having to retract a public statement later." Same reversible-first instinct, same named threshold, same written trade-off, no technical system involved at all.
What separates a strong answer from a mediocre one: a mediocre answer says "I looked into it, found the issue, and fixed it," with no threshold for escalation, no named people, and no explicit reversibility reasoning, essentially claiming credit for calm without showing judgment. A strong answer names the specific decision rule that made you act instead of investigate further, names who you looped in and why them specifically, and shows the trade-off was written down and reasoned about, not just felt.
You discover a teammate altered dataset contents to hide repeated ETL failures, raising ethical, legal, and product risks. Describe the immediate actions you would take to preserve evidence and data, whom you would notify (security, legal, people ops), how you would conduct an investigation while protecting product and customers, and recommendations to restore integrity and trust afterward.
Sample Answer
Situation: I find that a teammate intentionally altered dataset contents to hide repeated ETL failures, creating ethical, legal, and product risk.
Task: As the data engineer responsible for pipeline integrity, I must preserve evidence, stop further tampering, notify the right stakeholders, lead an investigation that protects customers and product, and recommend remediation to restore integrity and trust.
Action:
-
Preserve evidence & contain:
- Immediately take immutable snapshots/backups of the affected datasets, pipeline logs, and related storage (S3/GCS versions, DB snapshots, Kafka offsets).
- Freeze writes to the affected tables/objects (apply a short-term write-lock or revoke modify permissions) to prevent further changes.
- Collect audit logs, job execution traces, CI/CD deployment history, and relevant user activity (IAM, SSH, console).
- Record chain-of-custody: who accessed what and when; timestamp everything.
-
Notify appropriate teams (without broad disclosure):
- Inform Security/Incident Response to coordinate evidence handling and forensics.
- Notify Legal/Compliance to evaluate regulatory obligations, data breach laws, and retention of evidence.
- Brief People Ops/HR and my manager for personnel action and next steps.
- Inform Product/PM and Engineering leadership privately so they can assess customer impact and communication plans.
-
Conduct investigation while protecting product & customers:
- Triage scope: identify datasets and downstream consumers impacted; prioritize PII or regulatory-sensitive data.
- Work with Security to perform a forensics analysis on snapshots and audit logs (use read-only copies).
- Reconstruct timeline of alterations, correlate with ETL failure logs, and determine intent vs. mistake.
- Reprocess raw/ingest-layer data through a sandboxed pipeline to compute correct outputs; compare against altered dataset to quantify impact.
- Limit knowledge to need-to-know stakeholders to avoid leaks and preserve integrity.
-
Remediation & restoring trust:
- Restore correct data from raw sources and validated re-runs; where impossible, document gaps and compensating controls.
- Roll back any downstream decisions/reports driven by altered data; notify impacted teams and customers per legal guidance.
- Recommend immediate controls: enforce least-privilege access, mandatory dataset immutability/versioning, full audit logging, alerting on manual edits, and approval workflows for data changes.
- Propose process changes: mandatory blameless postmortem, ETL failure escalation path, runbook for retry vs. mask decisions, regular data integrity audits, and training on ethics/compliance.
- Work with People Ops on appropriate disciplinary or remediation actions per policy.
Result/learning: This approach preserves evidence, minimizes further risk to customers, ensures legal compliance, and creates technical and process safeguards that prevent recurrence—restoring product integrity and organizational trust.
You need to report an SLA breach rate where the SLA is a condition evaluated over events (for example, an approval must occur within 48 hours of a request), and there is no numeric measure on the underlying events. Design a factless fact table and supporting dimensions for this, and write an example SQL query to compute the monthly SLA breach percentage.
Sample Answer
Direct answer
Build a factless fact table with one row per relevant event (a request submitted, an approval completed), and compute the service-level agreement (SLA) breach percentage by comparing, for each request, whether a matching approval event exists within 48 hours, using conditional aggregation rather than a stored numeric measure.
Structured elaboration
- Schema:
sla_event_fact(request_id, event_type, event_time, request_date_key), factless, withevent_typedistinguishing 'REQUEST_SUBMITTED' from 'APPROVAL_COMPLETED'. - Deriving the metric: for each request, find its submission time and its (possibly absent) approval time, compute the elapsed duration, and classify as breached if either no approval exists or it exceeds 48 hours.
- Handling requests with no approval yet: these should count as breaches (or be excluded, depending on the exact business definition) if the 48-hour window has already elapsed as of the reporting date; the query needs an explicit rule for "not yet approved but window not yet elapsed" versus "not yet approved and window has elapsed" (the latter is a breach in progress).
Worked example
WITH requests AS (
SELECT request_id, event_time AS requested_at
FROM sla_event_fact WHERE event_type = 'REQUEST_SUBMITTED'
),
approvals AS (
SELECT request_id, MIN(event_time) AS approved_at
FROM sla_event_fact WHERE event_type = 'APPROVAL_COMPLETED'
GROUP BY request_id
)
SELECT
DATE_TRUNC('month', r.requested_at) AS report_month,
100.0 * SUM(
CASE WHEN a.approved_at IS NULL AND CURRENT_TIMESTAMP > r.requested_at + INTERVAL '48 hours' THEN 1
WHEN a.approved_at IS NOT NULL AND a.approved_at > r.requested_at + INTERVAL '48 hours' THEN 1
ELSE 0 END
) / COUNT(*) AS breach_pct
FROM requests r
LEFT JOIN approvals a ON r.request_id = a.request_id
GROUP BY 1
For a month with 100 requests, if 8 either exceeded 48 hours to approval or remain unapproved past that window, this computes 8/100 = 8.0% breach rate, an exact figure derived directly from the counted rows, not a stored measure.
Trade-offs and pitfalls
Getting the "not yet approved" case wrong is the most common bug: excluding still-pending requests entirely from the denominator understates the breach rate (since a pending request that's already blown the 48-hour window IS a breach, and shouldn't be silently dropped), while including every pending request (even ones still within the window) as neither a breach nor a pass, without a clear rule, produces an inconsistent metric month to month as requests move from pending into either breach or on-time state.
Recommended Additional Resources
- Interview Query - Specialized SQL and data engineering interview prep with real Amazon questions
- LeetCode SQL and Medium Problems - Practice medium to hard SQL and coding problems under time pressure
- HackerRank Data Engineering and SQL - Real-world coding challenges with data focus
- Grokking the System Design Interview - Comprehensive system design fundamentals and patterns
- AWS Certified Data Analytics Specialty - Official AWS certification covering data pipeline and analytics services
- Apache Spark Official Documentation and PySpark Tutorials - Deep learning of big data processing framework
- Blind.com and Levels.fyi - Interview reviews from actual Amazon Data Engineer candidates with specific questions
- Glassdoor Amazon Data Engineer Reviews - Recent interview experiences and question details
- YouTube: Real Amazon Interview Walkthroughs - Watch experienced engineers solve design problems in real interviews
- Amazon Leadership Principles - Study all 16 principles on Amazon's career website and practice with STAR method
- Designing Data-Intensive Applications by Martin Kleppmann - Deep technical foundation for distributed data systems
- Data Engineering Interview by Alex Xu - Practical guide covering system design for data systems at scale
Search Results
Amazon Data Engineer Interview: Inside the SQL, ETL, and ...
The online assessment is the first step for most applicants. It includes two to four timed questions covering SQL, data transformations, and light Python ...
Amazon Data Engineer Interview in 2025 (Leaked Questions)
What are some common technical questions asked in the interview? Expect questions on data modeling, ETL processes, SQL queries, and distributed ...
Amazon Data Engineer Interview (questions, process, prep)
We've put together the ultimate guide, complete with 50+ example questions and insider advice from our expert Amazon coaches Jitesh, Bilwasiva, and Dessy.
Amazon Data Engineer Interview Guide | Sample Questions (2025)
However, in the most common case, you'll be asked SQL, coding, or data modeling questions. The interviewer might also throw an LP question or two into a ...
Amazon Data Engineer Interview Guide 2024 | Questions, Process
You may be asked to describe your experience with different data warehousing and data lake technologies or to discuss how you would model and mine a particular ...
Master Data Engineer Interview Questions - YouTube
Are you preparing for data engineer jobs? In this must-watch video, we dive into a critical interview question commonly asked by leading ...
Top 50 AWS Interview Questions and Answers For 2025 - DataCamp
A complete guide to exploring the basic, intermediate, and advanced AWS interview questions, along with questions based on real-world situations.
This interview preparation guide was generated using AI-powered research from the sources listed above. While we strive for accuracy, we recommend verifying critical information from official company sources.
Want to create your own tailored preparation guide using our deep research?
Get Started for FreeInterview-Ready Courses
Visual-first, interactive, structured learning paths