Data Engineer question bank
800 questions. Filter by level and skill, track what you've solved, and see how many people get each one right.
- ETL vs ELT
- Why Parquet for analytics
- Fact and dimension tables
- Idempotent pipelines
- What is a DAG
- Purpose of a primary key
- When streaming is needed
- Partitioning a big table
- Row count of a LEFT JOIN
- Filtering with = NULL
- COUNT(*) vs COUNT(column)
- Filtering groups with HAVING
- Adding a number to NULL
- Star vs snowflake schema
- Grain of a fact table
- Why use surrogate keys
- SCD type that overwrites
- Goal of normalisation
- Row store or column store
- Weaknesses of CSV
- Where Avro fits
- Kafka consumer groups
- What a Kafka offset is
- Retrying flaky Airflow tasks
- What an Airflow sensor does
- Reading a cron schedule
- When Spark actually runs
- What a Spark partition is
- What a dbt model is
- Built-in dbt tests
- Data lake vs warehouse
- How object storage works
- Protecting PII in analytics
- A CSV bigger than memory
- Operator, task and task instance
- What the scheduler does
- Metadata database for production
- What @weekly means
- Attempts with retries=3
- Reading a >> [b, c] >> d
- Why use an EmptyOperator
- Passing data between tasks
- Value of {{ ds_nodash }}
- A new DAG that never runs
- Finding why a task failed
- Where to keep a database password
- Hook versus operator
- Getting the Amazon operators
- A DAG with a loop in it
- A DAG that only runs on demand
- Finding the finance DAGs quickly
- default_args and a task that differs
- What a TaskGroup is for
- Debugging a DAG on a laptop
- Passing a date range on a manual run
- A Slack message when a task fails
- Starting another DAG at the end
- A task that needs its own libraries
- The day before ds
- Stopping Airflow from parsing helpers
- Task in up_for_retry
- Rerunning one failed task
- A task that hangs for hours
- Trying one task from the command line
- Two teams use the same dag_id
- Explaining a DAG to the on-call person
- Which view shows past run states
- Reading one key of a JSON Variable
- Passing arguments to a PythonOperator
- Using a DAG param in SQL
- Running every 6 hours
- A campaign DAG that should stop
- Triggering a DAG from another system
- Not running Airflow yourself
- A poor fit for Airflow
- Wait before a retry by default
- Querying Postgres inside a @task
- An alert task that fires on failure
- Key of a returned XCom
- What a @task.bash function returns
- Where DAG files must be placed
- Storing a list of regions
- Primary key for order lines
- Modelling doctors and patients
- Several phones in one column
- Several unique columns
- Picking the natural key
- Reading crow's foot notation
- The model with indexes and types
- Why denormalise a reporting table
- A fully additive measure
- Invoice number in the fact table
- Why keep a date dimension
- One customer dimension for two facts
- A nullable coupon_id
- Lookup table for status codes
- Storing age or date of birth
- Kimball versus Inmon
- OLTP schema versus OLAP schema
- What "one big table" means
- Bronze, silver and gold layers
- created_at and updated_at columns
- Data type for phone numbers
- Job of a dbt staging model
- Where DynamoDB design starts
- Where a JSON column fits
- GENERATED ALWAYS AS IDENTITY
- Addresses for UAE customers
- Schema on read versus schema on write
- Batch or streaming for a daily report
- Incremental logic for a tiny table
- What SCD Type 1 does
- Keeping the old customer segment
- Why a dimension has its own key
- The bronze layer
- Why keep the raw files
- File format for an analytics lake
- Partitioning an events table
- Loading 10 million rows
- Keeping track of deleted rows
- Getting effectively-once results
- Remembering where the last load stopped
- Append or upsert for click events
- What reverse ETL means
- Which quality dimension is broken
- Checking a status column
- Guarding the grain of a table
- Correct numbers that arrive late
- Orders pointing to missing customers
- First check after a migration
- A row that says "order_id"
- Codes losing their leading zeros
- Data type for amounts in rupees
- One time zone for stored times
- Arabic names turning into ????
- Blank values that pass a not-null test
- Tools for data tests
- OLTP and OLAP workloads
- Why warehouses store columns
- Facts and dimensions
- Star versus snowflake schema
- Slowly changing dimension type 1
- ETL compared with ELT
- Snowflake storage and compute
- Loading files as they land
- Cost of a BigQuery scan
- SELECT * in BigQuery
- Kimball and Inmon approaches
- A warehouse slice for one team
- A measure you can always sum
- Pointing dbt at raw tables
- A small mapping table in dbt
- View or table materialization
- Rebuilding an incremental model
- Reusing SQL logic in dbt
- Where dbt keeps connection details
- Installing dbt_utils
- Layers in a dbt project
- Seeing the SQL dbt really runs
- What the _delta_log folder is
- Row format or column format
- One copy, many engines
- Exploring Parquet on a laptop
- Folders named dt=2026-10-01
- Schema-on-read and schema-on-write
- Sending warehouse data back to the CRM
- Topics and partitions
- Job of a Kafka broker
- Replication factor of three
- Which replica takes the writes
- Producer with acks=0
- Records older than retention
- Turning on producer compression
- Kafka without ZooKeeper
- Total lag over three partitions
- Sending a 5 MB message
- Why use a schema registry
- What Kafka Connect is for
- Reducing a topic's partitions
- Where group offsets are kept
- Kafka compared with a classic queue
- Event time and processing time
- Counting events in a one-minute window
- What a watermark says
- KStream versus KTable
- Default persistent state store
- What a Flink checkpoint is
- What keyBy does in Flink
- How Spark Structured Streaming runs
- Kappa architecture in one line
- Spotting a sequence of events
- Writing a stream job in SQL
- Encrypting traffic to brokers
- Only one service may write
- Not running brokers yourself
- Typos that create topics
- Where to put a trace ID
- A simple background job queue
- Lag for a group with no members
- Notification or full-state event
- Adding another consumer group
- What the Spark driver does
- Calling collect() on 500 GB
- Why DataFrames beat RDDs of objects
- Entry point of a Spark 3+ app
- Tasks in a 64-partition stage
- Where a job splits into stages
- Cost of inferSchema on CSV
- Selecting 3 of 200 columns
- Adding a constant column
- What explode() does
- union() with columns in another order
- Customers with no orders
- Writing to a path that exists
- What master local[*] means
- Reading a pretty-printed JSON file
- Recovering a lost partition
- Finding the slow part of a job
- spark-submit in cluster mode
- Removing duplicate order ids
- Orders lost after explode
- Filling nulls per column
- Scope of a temp view
- DROP TABLE on a managed table
- What Delta Lake adds to Parquet
- Fast count of unique visitors
- Cut-off values in show()
- filter() versus where()
- Grouping sales by month
- F.coalesce vs df.coalesce
- Why give a schema for JSON
- Comparing with the previous day's sales
- Parsing 25/03/2026 as a date
- when() with no otherwise()
- avg and count with a null value
- Rows from a cross join
- pandas-style code on a cluster
- Row count from sample(0.1)
- Tracking customer address history
- Incremental load with updated_at
- What causes a shuffle
- Joining with a small lookup table
- Ordering in Kafka
- Upserting into a target table
- Why use ref() in dbt
- Handling late events
- Keeping the latest row per key
- RANK and DENSE_RANK with ties
- NOT IN with a NULL in the list
- Day-over-day change with LAG
- WHERE filter after a LEFT JOIN
- Counting orders for every customer
- Table state after a MERGE
- Revenue doubled after a join
- Employees above their team average
- Keeping just the previous value
- Data Vault building blocks
- Log-based CDC advantages
- Duplicates from at-least-once delivery
- Surprise runs from catchup
- When a daily Airflow run starts
- When to cache in Spark
- repartition vs coalesce
- Eight consumers, six partitions
- How Parquet skips data
- Undoing a bad load
- LIMIT and BigQuery cost
- Idle Snowflake warehouse cost
- Filtering new rows in dbt
- Detecting stale source data
- What a data contract does
- Rerunning a half-failed load
- An API call at the top of a DAG file
- Reading a Variable without parse cost
- start_date=datetime.now()
- Ten tasks through a 4-slot pool
- Backfilled runs running one at a time
- Cleanup that must always run
- Join task skipped after a branch
- State after a short-circuit
- TaskFlow without >>
- Mapped tasks from two lists
- Fixed arguments in a mapped task
- A template that stays as text
- TemplateNotFound for a .sh script
- A 9 AM IST DAG in UTC terms
- Extra pieces for CeleryExecutor
- How KubernetesExecutor runs tasks
- What depends_on_past does
- Waiting for a DAG with another schedule
- Setting parallelism by environment
- Task instances in a 30-day rerun
- Task id inside a TaskGroup
- Clearing a task between setup and teardown
- No emails during a backfill
- Limiting one heavy task across runs
- Only 16 tasks run at once
- Sending a task to GPU workers
- One task needs pandas 1.x
- Rejecting a bad manual input
- A BashOperator that ends skipped
- Same conn_id in two places
- Defining a connection in an env var
- What the Fernet key protects
- A row-count check that fails
- Logs missing after a pod finishes
- Running two branches at once
- Choosing the rows for a daily extract
- Mapping over files found at run time
- A run that blocks the next ones
- schedule_interval after upgrading
- New DAGs not showing after Airflow 3 setup
- Pulling a named XCom in a template
- Returning several values from a @task
- An optional file that may not come
- Waiting until a job API says done
- Writing a custom operator
- Catching broken DAGs before deploy
- Making task logic easy to test
- Running a dbt project in Airflow
- Alerting when a run is late
- Metadata database keeps growing
- Running only on working days
- Worker slots versus parallelism
- Heavy tasks taking 3 slots each
- Task state removed in old runs
- Join after an optional step
- Keeping SQL in separate files
- Templates inside a dict argument
- What a BashOperator pushes
- Imports for DAG authors in Airflow 3
- Mapping over matched pairs
- Readable names for mapped tasks
- Manual run stuck in queued
- Loading DAGs from a Git repo
- How a reschedule sensor counts time
- Product name in order items
- Department name in employees
- Changing a supplier phone number
- Monthly total of daily balances
- Storing a conversion rate in a fact
- Recording class attendance
- Daily stock level per warehouse
- Tracking order milestones
- Many small flags on a fact
- Order date and ship date keys
- Visits with several diagnoses
- Which address was valid on a date
- Fact arrives before its customer
- Storing who reports to whom
- Facts with a missing product
- Rows in a daily stock snapshot
- Keeping salary data apart
- Comments on posts and photos
- Enum type or lookup table
- Which customer key the fact stores
- Spotting changed rows with a hash
- dbt snapshot strategies
- Fiscal quarter of 15 February 2026
- Tax rates that change over time
- Grain of an exchange rate table
- Comparing budget with actual sales
- A DynamoDB key on order status
- Embedding every login event
- Wide or narrow sensor table
- Two clerks edit the same record
- Clustering a partitioned table
- Redshift distribution for a big join
- A schema change that breaks no one
- Why add a semantic layer
- Hashing a business key for a surrogate
- Keeping every status change
- Selecting current rows from SCD2
- Joining facts to the right SCD2 version
- Keys that look equal but do not join
- Events that arrive days late
- Rerunning one day safely
- Write, audit, publish
- Dashboards empty during a reload
- Keeping one row per order
- Deleted rows still in the warehouse
- Starting CDC on an existing table
- Applying delete events in a MERGE
- Keeping changes to one row in order
- When to commit Kafka offsets
- Rerunning COPY on the same folder
- Missing rows when paging an API
- An API that returns 429
- Duplicates despite a primary key
- Which date to partition by
- Daily snapshots versus SCD2 rows
- Planning a two-year backfill
- 20 bad rows out of 2 million
- Is today's volume an anomaly
- Freshness lag against an SLO
- Warning before failing on stale sources
- A column that is sometimes null
- Row counts match but money does not
- Is 03/04/2026 March or April
- Addresses breaking the columns
- Catching bad JSON at the door
- A new payment method breaks a test
- Which dashboards a bad table affects
- Joining on email without exposing it
- Phone numbers for some users only
- Queries slow on a streaming table
- One 40 GB gzip CSV
- A file processed twice
- One bad message blocks a stream
- Choosing the grain of a fact table
- Slowly changing dimension type 2
- Surrogate keys in dimensions
- Summing account balances over time
- Comparing sales and returns
- Queries queue at month end
- Credits after resizing a warehouse
- A repeated query returns instantly
- Cloning a 5 TB database for testing
- How Snowflake skips data
- Querying JSON arrays in Snowflake
- Sharing tables with a partner
- Stopping full scans of a big table
- Rows from a repeated field
- A dashboard that aggregates every minute
- Storage cost for old partitions
- Redshift sort key for date filters
- Distributing a small dimension
- Speeding up a Redshift COPY
- Querying S3 from Redshift
- Keeping the latest row per customer
- Applying a batch of changes
- One big table for analysts
- Hiding phone numbers from most users
- Keeping history of a source table
- What an ephemeral model does
- Updated rows in an incremental model
- Selecting a model and its parents
- dbt build compared with dbt run
- Passing a start date into a model
- Smaller data in development
- A one-off business rule test
- The same check on many columns
- Tolerating a few bad rows
- Seeing which rows failed a test
- Showing dashboards in dbt lineage
- Permissions lost after each rebuild
- Rerunning after a failure
- A write with an extra column
- Adding a column on purpose
- Old snapshots fill object storage
- Filtering on a non-partition column
- Why Iceberg needs a catalog
- Why a status column compresses well
- Snowflake and Iceberg together
- Applying CDC to a lake table
- Reading only changed rows downstream
- Capping monthly Snowflake spend
- Three different revenue numbers
- What the ISR list contains
- acks=all with one broker down
- What a compacted topic keeps
- Deleting a key from a compacted topic
- Where a keyed record lands
- Records sent with no key
- Duplicates from producer retries
- Raising linger.ms
- Who picks a new leader
- A new group with earliest
- Missing records with latest
- Detecting a crashed consumer
- Disk needed for a week of events
- Partitions for a throughput target
- Sending scanned invoices through Kafka
- Adding a field safely
- How Debezium captures changes
- One record that always fails
- Brokers spread over three zones
- Which offset to commit
- Keeping a year of data cheaply
- Reprocessing since yesterday morning
- Windows that overlap
- Joining two topics in Kafka Streams
- Joining with a small reference table
- Matching orders with payments
- Restoring state after a crash
- An extra topic appears
- Threads with nothing to do
- Exactly-once in Kafka Streams
- Reading live counts from a stream app
- Upgrading a stateful Flink job
- Lag grows behind a slow sink
- Flink source parallelism of 16
- State that grows without limit
- State larger than memory
- Sending rules to every instance
- Restarting a Spark stream
- Spark output modes
- Writing to the DB and Kafka together
- How the outbox pattern works
- Making a payment consumer safe to replay
- Duplicates that do not matter
- Removing duplicate clicks in a stream
- Unique visitors per minute at scale
- Events stamped in the future
- Under-replicated partitions alert
- Lag climbs after a release
- One partition far busier than others
- Key for order lifecycle events
- A standby cluster in another region
- A broker's disk is 95% full
- One broker leads most partitions
- When a producer gives up
- Raising fetch.min.bytes
- One client slows the cluster
- The target database is down
- Which timestamp a record carries
- Why a groupBy made 200 tasks
- AQE and tiny shuffle partitions
- When Spark broadcasts on its own
- One 20 GB gzip file
- Input partitions for 10 GB of Parquet
- How many waves of tasks
- partitionBy on user_id
- Filtering on a partition column
- A UDF in the WHERE clause
- A cached DataFrame bigger than memory
- An iterative loop that gets slower
- Latest row per customer
- groupByKey vs reduceByKey
- Reading SortMergeJoin in explain()
- Bad-row counter that runs high
- A 50 MB Python dict in every task
- Task not serializable error
- Malformed rows in a JSON feed
- Rows with null keys vanish in a join
- Structured Streaming output modes
- Sorting rows inside each file
- Order of values from collect_list
- Joining two big tables every day
- Removing idle executors safely
- Capping rows per output file
- One file per date folder
- Faster serialization for RDDs
- One database connection per partition
- Upserting a stream into a table
- Running a stream as a daily job
- First micro-batch is enormous
- A batch longer than its trigger
- Delta MERGE for new and changed rows
- Reading yesterday's table version
- Customers who ordered, no duplicates
- Making pivot faster
- Subtotals with rollup
- Same timestamp, different hour
- Parsing a JSON string column
- Changing each element of an array
- Union of files with a new column
- A 7-row rolling sum
- Slow toPandas on 2 million rows
- What Spark Connect changes
- Thousands of tiny Delta files
- Appending a new column to Delta
- Concurrent tasks with task.cpus 2
- Rows missing after a != filter
- Where to fit a StandardScaler
- Window sum when days repeat
- One task takes forever
- Exactly-once end to end
- Millions of tiny files
- Safe backfills
- Applying CDC events
- Cutting warehouse scan cost
- Upstream renamed a column
- Why table formats exist
- Running total with tied dates
- LAST_VALUE returns the current row
- Longest login streak
- FULL OUTER JOIN row count
- GROUP BY with NULL keys
- Recursive CTE stopping point
- Double counting in an SCD2 join
- Which late event is kept
- Committing offsets too early
- Adding partitions to a keyed topic
- A slow Python UDF in PySpark
- Distinct users on billions of rows
- Iceberg hidden partitioning
- VACUUM and time travel
- Two writers, one lakehouse table
- Copy-on-write vs merge-on-read
- Clustering for two filter columns
- Choosing a Redshift DISTKEY
- Rows missed by a strict watermark
- New column in a dbt incremental model
- Hashing emails is not anonymising
- Overwrite deleted the whole table
- Which day does an event belong to
- Sensors blocking every worker
- Failed task but the run is green
- Sensor timeout with retries set
- Cron with both day fields set
- Every task loads the last table
- XCom from a failed attempt
- Tasks stuck in deferred
- A DAG file Airflow ignores
- A templated list arrives as a string
- Daylight saving and two schedules
- Mapping over zero files
- DAG import timed out
- DAG scheduled on two assets
- Task code querying the metadata DB
- Running two schedulers safely
- Tasks waiting while workers sit idle
- Sensor waits hours on a failed upstream
- 500 sensors waiting for hours
- Running task on a dead worker
- Received SIGTERM in a task log
- Retry waits that grow too long
- Doubled rows after a retry
- Effective priority of a root task
- Mapping over 2,000 items
- {{ execution_date }} after Airflow 3
- Consumer DAG ran with no new data
- Run when either feed updates
- Mixing executors in one deployment
- Short-circuit that skips the final alert
- depends_on_past vs wait_for_downstream
- Summing results of mapped tasks
- Database calls in __init__
- Lost variable after a task resumes
- Who runs a backfill in Airflow 3
- A task that asks for too many slots
- Large XComs without filling the database
- Template lost inside an f-string
- Clearing across two DAGs
- Waiting on a triggered DAG cheaply
- Triggering from a message queue
- An API key printed in a task log
- Two runs overwriting one temp file
- Report runs 4 hours late in Dubai
- Workers dying on a pandas join
- One of 12 mapped tasks fails
- ds moved by a day after a timetable change
- Alerts per failed attempt
- Finishing old runs before new ones
- A sensor that also returns data
- 3NF but not BCNF
- Combining orders and returns facts
- Attributes that change every month
- Shipping charge counted three times
- Weights in a joint account bridge
- Fast reads of a category tree
- A country with no region level
- Sales in AED, INR and SAR
- What we knew about a salary
- Product specs as attribute rows
- Adding an id to an enrolment table
- Only one current SCD2 row
- Date key for a late-night Dubai order
- Reprinted invoice shows a new price
- Basket analysis on a daily summary fact
- is_weekend for UAE dates
- Invoices pointing at another tenant
- A region rename in a wide table
- Hash diff misses some changes
- Rebuilding a dimension renumbered keys
- Why Data Vault 2.0 uses hash keys
- Two accounts with the same email
- Storing money as integer fils
- Two tables that reference each other
- A partition that never stops growing
- A product moved to a new category
- A company that buys and sells to you
- Postgres disk filling after CDC outage
- An older update overwrites a newer one
- A row missed despite >= on updated_at
- MERGE fails on duplicate source rows
- A MERGE that scans 5 years of data
- Order saved but event never sent
- Exactly-once inside Kafka
- A compacted CDC topic
- Backfill and daily load collide
- Rows missed because of clock skew
- Changing a field type in a topic
- Deleting one person from a data lake
- Retries leaving extra files
- Revenue inflated by repeated events
- GST totals off by a few rupees
- Stopping bad data reaching the CFO
- Too many data alerts
- No FX rate for Saturday orders
- An order on the wrong IST day
- Average order value up 100 times
- Bank and app never agree on a day
- Testing that a job is safe to rerun
- Proving a rewrite changed nothing
- Adding consumers to cut lag
- Birth dates of 1900-01-01
- Duplicates that slip past a stream dedupe
- Consumer down longer than retention
- A new CSV column shifts the data
- Fast single-order lookups in Snowflake
- A fact table with no measures
- Where the invoice number lives
- Many small flag columns
- Revenue tripled after a join
- A Snowflake stream that keeps returning rows
- Billing for a ten-second query
- On-demand or reserved slots
- A sale for an unknown product
- Building blocks of Data Vault
- A query that spills to remote storage
- Data dropped two weeks ago
- Staging tables that cost too much
- Snapshot of a table with no updated_at
- Duplicates after a rerun
- Rebuilding the last three days
- dbt's microbatch strategy
- Faster CI for a 900-model project
- Stopping a column type change
- Testing logic on fixed inputs
- Changing partitioning on a live table
- How Iceberg plans a query
- Deleting a few rows cheaply
- Reading a Delta table as Iceberg
- Checking data before readers see it
- Monthly users from daily users
- Two of three replicas lost
- Risk of unclean leader election
- Old records that outlive retention
- Ordering with five in-flight requests
- Slow batch kicks a consumer out
- Why cooperative rebalancing
- Rolling restarts without rebalances
- The new consumer rebalance protocol
- Producers upgrade before consumers
- Consumers and aborted transactions
- Two copies of the same producer
- Cutting cross-zone traffic bills
- Records not yet visible to consumers
- A late event joins two sessions
- When a window first fires
- Windows that never close
- A late record after the grace period
- Failover takes twenty minutes
- One alert per window, not many
- Emitting on a timer with no traffic
- State lost after a code change
- Exactly-once writes from Flink to Kafka
- Checkpoints time out under backpressure
- Which window Spark has emitted
- Duplicate rows from foreachBatch
- Memory for hopping window state
- Enriching events with a changing table
- Customers get two SMS messages
- Cost of salting a hot key
- Failing consumers over to the DR cluster
- Disk cap from retention.bytes
- Rebalancing data without hurting clients
- Both compact and delete
- Seeing every update on a compacted topic
- Erasing one person from a long log
- What share groups add
- Broadcast hint on the wrong side
- JDBC read with lowerBound and upperBound
- Executors on a 16-core node
- Unified memory for a 10 GB heap
- 6,000 files from one write
- Container killed for exceeding memory
- FetchFailedException in a stage
- Rows in both train and test
- Adding 300 columns with withColumn
- A window with no partitionBy
- Invalid casts after moving to Spark 4
- Speculation and a database sink
- startingOffsets changed but ignored
- Stream-stream join running out of memory
- Cached numbers after an overwrite
- Choosing partitions for a 500 GB shuffle
- Pruning a fact table through a join
- Bad join order on Hive tables
- A broadcast hint on 8 GB
- Using monotonically_increasing_id as a key
- first() gives different answers
- Where nulls go in a sort
- coalesce(1) made the whole job slow
- Plan changed from SortMerge to Broadcast
- A new column missing on read
- applyInPandas fails on one customer
- Windowed counts arrive late
- Changing a streaming aggregation key
- Half-written files in a stream output
- Using spot instances for Spark
- Which partition AQE treats as skewed
- Cost of salting a skewed join
- Rows produced by cube on two columns
- Time travel fails after VACUUM
- Streaming state causing long GC pauses
- Branch code 007 read back as 7
- Shuffles after repartition on the same key