Miscellaneous & Anti-Patterns Flashcards

(40 cards)

1
Q

What is a design pattern in data engineering?

A

A reusable solution to a common data problem, described at a high level so it can be adapted to specific technologies.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is an anti-pattern in data engineering?

A

A common but counterproductive approach that seems convenient initially but leads to reliability, performance, or maintainability problems over time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why is recognizing patterns and anti-patterns valuable for a senior data engineer?

A

It helps choose proven approaches quickly, avoid known pitfalls, and reason about trade-offs in complex systems.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the ‘raw → staging → curated’ layering pattern?

A

A pattern where raw data is ingested with minimal changes, staging standardizes and cleans it, and curated layers provide business-ready models.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Why is mixing raw and curated data in the same tables or paths an anti-pattern?

A

It blurs semantics, increases the risk of using unclean data in production, and complicates lifecycle and governance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the ‘append-only logs’ pattern?

A

Storing events as immutable, time-ordered records and deriving state from them, which supports replay, auditability, and recovery.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Why is in-place destructive updating of historical data generally an anti-pattern in analytics?

A

It destroys history, hinders debugging, and can break time-based analysis and reproducibility.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the ‘write-ahead log plus derived views’ pattern?

A

Store raw events or transactions, and build derived summary tables and materialized views from them for fast queries.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Why is ‘report directly from application OLTP databases’ usually an anti-pattern at scale?

A

It couples analytics to operational systems, risks performance impact on OLTP workloads, and provides inconsistent or incomplete data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the ‘single source of truth’ pattern?

A

Designating a canonical dataset or table as the authoritative version for a domain, with other copies derived from it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Why is letting many teams maintain their own uncoordinated copies of the same core data an anti-pattern?

A

It leads to divergent definitions, conflicting numbers, and complex reconciliation work across the organization.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the ‘idempotent job’ pattern?

A

Jobs are written so rerunning them with the same inputs produces the same output, avoiding duplicates or corruption.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Why are non-idempotent jobs an anti-pattern in scheduled and retried pipelines?

A

They can double-count records, leave partial updates, and require manual cleanup after failures.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the ‘backfill-friendly’ pattern?

A

Designing pipelines so they can be safely run over historical ranges without special-case logic or manual intervention.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Why is hard-coding dates or ranges in pipeline code an anti-pattern?

A

It makes backfills and parameterized runs difficult, forcing code changes for routine maintenance tasks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the ‘schema-first’ or contract-first pattern?

A

Defining schemas and contracts before building pipelines, using them as the source of truth for producers and consumers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Why is allowing schemas to evolve silently without communication an anti-pattern?

A

Unannounced changes break consumers, cause subtle bugs, and undermine trust in the data platform.

18
Q

What is the ‘slowly changing dimension (SCD) type 2’ pattern used for?

A

Capturing historical attribute changes in dimension tables so analyses can reflect what was known at different times.

19
Q

Why is rewriting historical dimension attributes without tracking changes an anti-pattern in many analytics systems?

A

It loses history and may produce misleading historical reports that reflect current attributes instead of past reality.

20
Q

What is the ‘late-arriving data handling’ pattern?

A

Designing pipelines and models to accept and correctly integrate records that arrive after their nominal processing window.

21
Q

Why is ignoring late-arriving data an anti-pattern for time-based metrics?

A

It can systematically undercount or misalign metrics, particularly in domains with delayed reporting or eventual consistency.

22
Q

What is the ‘feature store’ pattern in ML systems?

A

Centralizing feature definitions, storage, and serving so multiple models can reuse them consistently across training and inference.

23
Q

Why is embedding one-off feature code directly into each model script an anti-pattern?

A

It leads to duplicated logic, inconsistent definitions, and difficult maintenance when definitions or data sources change.

24
Q

What is the ‘small, composable jobs’ pattern?

A

Breaking pipelines into smaller steps that each do one thing well and can be tested, monitored, and reused independently.

25
Why is the 'giant monolithic job' often an anti-pattern?
It is hard to understand, test, debug, and evolve; failures can require rerunning large amounts of work even for small changes.
26
What is the 'orchestration as coordinator, not compute' pattern?
Using the orchestrator only to schedule and coordinate tasks, while actual data processing happens in specialized compute engines.
27
Why is putting heavy data processing logic directly in the orchestrator an anti-pattern?
It entangles control logic with data logic, strains the orchestrator, and reduces portability and testability of transformations.
28
What is the 'metric as a first-class object' pattern?
Defining metrics with clear formulas, dimensions, and ownership in a central semantic layer or catalog.
29
Why is hard-coding metric logic separately in many reports and pipelines an anti-pattern?
It produces inconsistent numbers and makes changes to metric definitions complex and error-prone.
30
What is the 'one fact, many slices' pattern in warehousing?
Designing fact tables at a clear grain so they can support many different analysis cuts via dimensions instead of many overlapping, redundant facts.
31
Why is proliferating many similar fact tables with slightly different grains an anti-pattern?
It complicates modeling, confuses users, and makes reconciliation and maintenance more difficult.
32
What is the 'observability baked in' pattern?
Including logging, metrics, and data checks in pipeline design from the start instead of adding them only after incidents.
33
Why is treating observability as an afterthought an anti-pattern?
It delays detection of issues, increases time to resolve, and makes root-cause analysis much harder when problems occur.
34
What is the 'cost-aware design' pattern?
Making architectural choices with explicit awareness of storage, compute, and transfer costs, and measuring impact over time.
35
Why is ignoring cost until budgets are exceeded an anti-pattern?
By then, expensive patterns are deeply embedded, making optimization or re-architecture painful and disruptive.
36
What is the 'testable pipeline' pattern?
Structuring transformations and code so they can be tested with small datasets and automated tests before running at full scale.
37
Why is having pipeline logic that only runs in production with live data an anti-pattern?
Bugs are found late, on critical data, and often during business hours, causing avoidable incidents and manual debugging.
38
What is the 'documented ownership' pattern?
Assigning each dataset, pipeline, and model clear owners responsible for quality, uptime, and evolution.
39
Why is the 'everyone and no one owns it' state an anti-pattern?
Issues linger unresolved, quality degrades, and it is unclear who decides on schema or process changes.
40
What is a good one-sentence mental model for patterns and anti-patterns in DE?
Prefer designs that are explicit, idempotent, testable, and reusable, and be suspicious of shortcuts that hide complexity, mix concerns, or make history and contracts opaque.