Skip to main content

Data Foundations

Modern data platforms are built on a set of enduring concepts. While frameworks like Apache Spark, Apache Kafka, and Apache Flink evolve rapidly, the principles that govern data storage, processing, and distribution change slowly. Understanding these principles before diving into specific tools creates engineers who can design systems rather than merely configure them.

This section of BigDataDevPro covers the conceptual bedrock of data engineering. It is designed for engineers who want to move beyond isolated tutorials and develop a coherent mental model of how data platforms work β€” from the moment data is generated to the point it is consumed by analytics, machine learning models, or operational applications.

The topics here apply across cloud providers, programming languages, and orchestration frameworks. A strong grasp of data foundations shortens the learning curve for every subsequent technology in this handbook and improves the quality of architectural decisions in production environments.

What You Will Learn in Data Foundations​

The Data Foundations section covers the knowledge areas that underpin all modern data engineering work. Each topic connects to the others, forming a framework that supports the advanced material in later sections.

  • Data Engineering Fundamentals: The role of data engineering within an organization, the lifecycle of data, and the distinction between operational and analytical systems.
  • Batch and Stream Processing: The two dominant processing paradigms, their latency and throughput characteristics, and the architectural patterns that emerge from each.
  • ETL and ELT: Extract, Transform, Load patterns and how cloud data warehouses and lakehouses have shifted the dominant approach.
  • Distributed Computing: Clusters, parallel execution, fault tolerance, data locality, and the coordination challenges that distributed processing frameworks must solve.
  • Data Storage Concepts: Object stores, distributed file systems, table formats, and the design trade-offs that affect query performance and cost.
  • Data Modeling: Dimensional modeling, star schemas, normalization versus denormalization, and how data modeling supports analytical workloads.
  • File Formats: Row-based and column-based formats, their compression characteristics, schema evolution support, and when to use each.
  • Partitioning and Performance: How data organization affects query pruning, join strategies, and the distribution of work across a cluster.
  • Compression and Serialization: The balance between CPU cost, storage footprint, and network transfer when choosing codecs and serialization frameworks.

These topics are not independent. A decision about file format affects compression ratios, which affect storage costs and query performance, which in turn influence the choice of partitioning strategy. The articles in this section make these relationships explicit.

Data Engineering Fundamentals​

Data engineering is the practice of designing and operating the infrastructure that collects, moves, transforms, and serves data. Unlike software engineering, which focuses on application logic, data engineering focuses on the pipelines and platforms that make data reliable, accessible, and performant for downstream consumers.

Core concepts:

  • Data pipelines: Directed acyclic graphs of tasks that extract data from sources, apply transformations, and load results into serving layers.
  • Data platforms: The integrated set of storage, compute, and governance components that support multiple pipelines and use cases.
  • Data producers and consumers: Applications, databases, and devices that generate data; analysts, scientists, and models that consume it.
  • Operational data vs. analytical data: OLTP systems optimized for low-latency reads and writes versus OLAP systems optimized for aggregate queries across large datasets.

Data engineering bridges the gap between applications that produce data and the analytical and AI systems that depend on it. A well-designed data platform makes data trustworthy, reduces duplication, and enables self-service access without compromising governance.

Batch Processing vs Stream Processing​

Batch processing and stream processing represent the two fundamental models for computing over data. The distinction is not always rigid β€” many platforms now blur the boundary β€” but understanding the native characteristics of each is essential.

  • Batch processing: Operates on bounded, finite datasets. Jobs run periodically (hourly, daily) and process all available data within a time window. High throughput and high latency. Ideal for ETL workloads, end-of-day reporting, and model training.
  • Stream processing: Operates on unbounded, continuous data streams. Events are processed as they arrive, often with millisecond to second latency. Lower per-record throughput but enables real-time dashboards, fraud detection, and operational alerting.

Key dimensions to evaluate:

  • Latency: How quickly results are available after data arrives.
  • Throughput: The volume of data processed per unit of time.
  • Event time vs. processing time: The time at which an event occurred versus the time it was observed by the system. Handling the gap between them requires watermarking and windowing strategies.
  • State management: Batch systems can reprocess history easily; stream systems must maintain and recover state across failures.

Most organizations operate both batch and stream pipelines. The Data Processing and Data Streaming sections of this handbook explore the engines that implement each model.

ETL vs ELT​

The sequence in which data is extracted, transformed, and loaded has architectural consequences that ripple through cost, governance, and agility.

  • ETL (Extract, Transform, Load): Transformation occurs in a dedicated processing layer before data reaches the target system. Traditional pattern for on-premises data warehouses with expensive storage and compute. Provides strict control over data quality but slows down ingestion and limits flexibility.
  • ELT (Extract, Load, Transform): Raw data is loaded directly into the target system, and transformations are performed there using the system’s own compute. Enabled by cloud data warehouses with elastic scaling and cheap storage. Supports faster iteration, schema-on-read, and more democratized transformation logic.

The rise of the lakehouse extends ELT principles to data lakes: raw data lands in object storage, and transformations occur through engines like Spark or SQL query layers. This approach preserves raw data for reprocessing while enabling ACID-compliant, warehouse-like query performance.

A modern data platform typically uses ELT for analytical workloads while retaining ETL for cases that require strict privacy or compliance transformations before data lands in shared storage.

Distributed Systems Fundamentals​

Data engineering at scale requires distributing work across multiple machines. Distributed systems theory provides the vocabulary and mental models to reason about this complexity.

  • Cluster architecture: A set of nodes that coordinate to perform work. Typically consists of a master/coordinator node and multiple worker/executor nodes.
  • Parallel processing: Dividing a computation into independent tasks that execute concurrently. Data parallelism distributes partitions of data; task parallelism distributes different operations.
  • Fault tolerance: The ability to recover from node failures without data loss or incorrect results. Techniques include checkpointing, lineage-based recomputation, and replication.
  • Scalability: Horizontal scaling adds more machines; vertical scaling adds more resources to existing machines. Distributed data systems are designed for horizontal scaling.
  • Data locality: Moving computation to where data resides reduces network I/O and improves performance. This principle directly influences partitioning and scheduling decisions in Spark.
  • Consensus: Algorithms like Raft and Paxos enable distributed agreement on state, which underpins Kafka’s controller election and distributed locks.

Every large-scale data technology β€” Spark, Kafka, Flink β€” is built on these concepts. When a Spark job experiences a shuffle bottleneck or a Kafka consumer group rebalances, the root cause is explainable through distributed systems fundamentals. Investing time in this area pays dividends throughout a data engineering career.

Data Storage Fundamentals​

Storage is the foundation on which everything else rests. The choice of storage architecture determines query performance, cost profiles, and the types of processing that are possible.

  • File storage: Hierarchical file systems (local or networked) suitable for small-scale or transient data.
  • Object storage: Flat namespace with immutable objects, accessible via HTTP APIs. Amazon S3, Azure Blob Storage, and Google Cloud Storage are the backbone of cloud data platforms. Provides high durability, separation of compute and storage, and cost-effective scaling.
  • Block storage: Low-latency, high-IOPS volumes attached to virtual machines. Used for databases and temporary Spark shuffle data.
  • Database storage: Structured data managed by a DBMS with ACID guarantees. Supports transactional workloads but is typically more expensive and less scalable for large analytical datasets.

HDFS (Hadoop Distributed File System) historically filled the role that object storage occupies today. It remains relevant in on-premises deployments, but greenfield cloud projects overwhelmingly adopt object storage paired with open table formats.

The shift to disaggregated storage β€” where compute clusters are ephemeral and data persists in object storage β€” is a defining characteristic of modern data platforms. Understanding the performance characteristics of object storage (high throughput, higher latency for small requests, eventual consistency in some regions) is critical for optimizing data lake and lakehouse designs.

Data Formats and Serialization​

Data is stored and transmitted in specific formats that encode structure, compression, and schema information. The format choice has a first-order impact on storage cost, query speed, and interoperability.

FormatTypeCompressionSchema EvolutionUse Case
ParquetColumnarHighSupportedAnalytical queries, lakehouse storage
ORCColumnarHighSupportedHive-optimized analytical workloads
AvroRow-basedModerateRobustStreaming, CDC, write-heavy pipelines
JSONRow-basedNone/LowFlexibleAPI communication, semi-structured data
CSVRow-basedNoneNoneExchange format, limited to simple data

Columnar formats like Parquet and ORC are optimized for read-heavy analytical workloads. They store data by column, enabling vectorized query execution, predicate pushdown, and better compression due to homogeneous data within columns. Row-based formats like Avro excel in write-heavy scenarios β€” streaming ingestion, message serialization β€” where entire records are appended together.

Compression algorithms (Snappy, Zstd, Gzip, LZ4) add another dimension. Snappy and LZ4 prioritize speed; Zstd and Gzip prioritize compression ratio. The optimal combination depends on whether the bottleneck is CPU, storage budget, or network bandwidth.

Schema evolution β€” the ability to add, remove, or modify columns over time without breaking readers β€” is another critical consideration. Avro, Parquet, and ORC all support schema evolution to varying degrees, while CSV and JSON impose this responsibility on application code.

Data Partitioning and Performance Concepts​

Partitioning is the primary mechanism for organizing large datasets into manageable, queryable subsets. It is not an optimization detail; it is a fundamental design decision that affects every downstream consumer.

  • Partitioning: Dividing a dataset into discrete directories or files based on column values (e.g., year=2024/month=01/).
  • Partition pruning: The query engine skips partitions that do not match filter predicates, dramatically reducing I/O.
  • Hot partitions: When a small number of partition values receive a disproportionate amount of data or query traffic, causing skew and bottlenecks.
  • Data skew: Uneven distribution of data across partitions, leading to some tasks processing far more data than others.

Effective partitioning requires understanding query patterns. Partitioning by date is common for time-series data. Multi-level partitioning (e.g., date and region) can provide fine-grained pruning but risks creating too many small files. Over-partitioning is as harmful as under-partitioning; it increases metadata overhead and reduces file sizes below the efficiency threshold for columnar formats.

In distributed processing engines, partitioning also determines how data is distributed across worker nodes during shuffles. Poor partitioning leads to network-heavy operations and straggler tasks that delay entire jobs.

Data Modeling Fundamentals​

Data modeling structures raw information into entities and relationships that can be queried efficiently. While modeling techniques vary by database type, analytical data modeling β€” particularly dimensional modeling β€” is central to data engineering.

  • Dimensional modeling: Separates data into fact tables (measurable events, quantitative data) and dimension tables (descriptive attributes).
  • Fact tables: Contain business measurements β€” sales amounts, click counts, sensor readings β€” at a fine grain. Usually large, append-heavy, and join-dependent on dimensions.
  • Dimension tables: Contain attributes like customer demographics, product categories, or date hierarchies. Used to filter, group, and label fact data.
  • Star schema: A fact table surrounded by denormalized dimension tables. Optimized for query simplicity and performance in analytical databases.
  • Normalization vs. denormalization: Normalized models reduce redundancy and improve write consistency; denormalized models reduce joins and improve read performance. Data warehouses and lakehouses typically favor denormalization for analytical speed.

Data modeling connects directly to storage formats and partitioning. A well-modeled star schema with properly partitioned fact tables can deliver sub-second query performance across billions of rows. Conversely, a poorly modeled schema forces expensive joins and full-table scans that negate the benefits of columnar formats and partitioning.

Modern transformation tools like dbt have made data modeling a software engineering discipline, with testing, version control, and documentation embedded in the development workflow.

Data Foundations Learning Path​

The articles in this section are designed to be read in a logical sequence, each building on the previous:

  1. Understand data engineering: Start with a clear picture of the discipline and its role in modern organizations.
  2. Learn processing models: Grasp batch versus stream, ETL versus ELT β€” the high-level patterns that shape all pipelines.
  3. Understand distributed systems: Build the mental model for clusters, parallelism, and failure recovery.
  4. Master storage concepts: Learn how data lakes, warehouses, and lakehouses store and organize data.
  5. Understand data formats: Compare Parquet, ORC, Avro, and others to make informed decisions.
  6. Learn data modeling: Structure data for analytical efficiency and business clarity.
  7. Prepare for advanced technologies: With these foundations in place, Spark, Kafka, Flink, and lakehouse architectures become applications of known principles rather than opaque black boxes.

Start with the following articles inside the Data Foundations section:

Connection to Other Sections​

Data Foundations provides the conceptual groundwork for every subsequent section of this handbook.

To Data Processing: The Data Processing section applies distributed computing and storage concepts to Apache Spark. Understanding shuffle, partitioning, and file formats at a conceptual level makes Spark tuning decisions intuitive rather than trial-and-error.

To Data Streaming: The Data Streaming section requires a solid grasp of event semantics, delivery guarantees, and state management. The distributed systems and processing model fundamentals covered here directly inform Kafka consumer design and Flink checkpoint configuration.

To Data Architecture: The Data Architecture section builds on every topic in Foundations β€” storage, modeling, partitioning, and processing paradigms β€” to design end-to-end platforms that meet business requirements. A weak foundation becomes visible in architecture decisions that fail at scale.

Work through the Foundations section thoroughly before moving on. When you encounter a configuration parameter in Spark or a design decision in a streaming pipeline, the explanation will almost always trace back to a concept introduced here.