data engineering
AI, ML & GenAI interview questions tagged data engineering, across every topic.
22 questions · 9 unlocked for you
Concepts behind "data engineering"
The curriculum that explains the ideas these questions test.
Foundational
Window FunctionsWindow functions run calculations over a set of rows tied to the current row, without collapsing them the way GROUP BY does, so you can rank within groups, build running totals and moving averages, and compare a row against its neighbors (LAG/LEAD), all in a single pass. They anchor analytics SQL: top-N-per-group, sessionization, cohort analysis, and period-over-period. AI, ML, and GenAI interviews probe them because they are the single most-tested SQL skill and the clearest way to write analytical queries.🗄️ Data & SQL Engineering
Foundational
Data Quality and ContractsModels and analytics are only as good as the data behind them, and a silent upstream data change (a renamed column, a units switch, a spike in nulls) corrupts everything downstream without raising an error. Data quality means automated checks (schema, ranges, nulls, freshness, volume, uniqueness) plus data contracts between producers and consumers enforced in CI. AI, ML, and GenAI interviews probe it because 'garbage in, garbage out' is the most common and hardest-to-diagnose cause of model and dashboard failures.🗄️ Data & SQL Engineering
Foundational
CTEs and SubqueriesA CTE (the WITH clause) names an intermediate result so a query reads as a top-to-bottom pipeline rather than nested subqueries. The skill is knowing when a subquery should be correlated versus uncorrelated, when a recursive CTE is the right tool for hierarchies and graphs, and when a CTE acts as an optimization fence that blocks the planner. AI, ML, and GenAI interviews probe it because refactoring a tangled nested query into a readable, correct pipeline is a daily data-engineering task.🗄️ Data & SQL Engineering
Foundational
Parsing Messy, Real-World DataProduction data arrives messy: formats vary, fields go missing, encodings break, records come malformed, and edge cases appear that you never planned for. Defensive parsing tackles the unhappy path on purpose, checking input, choosing per record whether to skip, default, or fail, and keeping one bad record from taking down the batch. Applied-AI interviews test this (frequently as a coding screen) because feeding documents and data into AI systems is half the work, and fragile parsers built for clean input break the moment they hit production.💻 Coding & Engineering Craft
Core
Idempotent Data PipelinesData pipelines fail and get rerun, so a pipeline has to be idempotent: running it again yields the same result rather than duplicated or corrupted data. You get there with insert-overwrite by partition, MERGE/upsert keyed on a business id, and deterministic transforms, instead of blind appends that double-count on retry. AI, ML, and GenAI interviews probe it because flaky pipelines are the norm, and a non-idempotent pipeline turns a routine retry into duplicated revenue numbers or a corrupted table.🗄️ Data & SQL EngineeringSign in
Core
Gaps and Islands (Sessionization)Gaps-and-islands is the pattern for grouping consecutive rows into runs (islands) split by breaks (gaps), the machinery behind sessionization, streak detection, and merging contiguous ranges. The trick is to assign a group id that holds constant within a run, classically with window functions: ROW_NUMBER differences or LAG-based break flags fed into a running sum. AI, ML, and GenAI interviews probe it because sessionizing events (user sessions, activity streaks, contiguous time ranges) is a constant data task and a sharp test of window-function fluency.🗄️ Data & SQL EngineeringSign in
