Introduction to Data Engineering
Welcome to Mastering Azure Databricks for Data Engineers. In this course you'll learn the Databricks platform and how to use it, together with Apache Spark, to solve data engineering problems.
Before we get to the tools, we need a common understanding of what data engineering is. What do we do as data engineers? What happens in a data engineering project? In this lecture we answer those questions, and then we look at the reference architecture the rest of the course builds on.
Who Works With Enterprise Data
Google Cloud's data engineering reference architecture sorts everyone who interacts with enterprise data into three groups. The grouping is based purely on what each group does.
Three groups working with enterprise data: business data owners, the data engineering team, and data consumers
Business data owners
Business data owners develop and manage the operational systems of an organization: banking applications, e-commerce applications, OTT applications, IoT applications. These are the systems your customers use every day, and they keep the business running.
They are called data owners because these systems capture and store business data and customer data. The data starts out with them.
Data consumers
Data consumers are responsible for optimizing, growing, and monitoring the business. They build systems for each purpose:
| Purpose | Example systems |
|---|---|
| Optimize the business | Fraud prevention |
| Grow the business | Recommendation systems that grow revenue, customers, products, and sales |
| Monitor the business | Sales and revenue reports, KPIs, and other metrics |
They are called consumers because they build all of these on top of the organization's data. They need that data to take data-driven decisions and to build data-driven applications.
The data engineering team
The data is with the owners, and the consumers need it. The data engineering team sits in the middle and connects the two.
We collect data, transform it, and make it easy to consume. To us the data consumers are the customers. We take their requirements and work backwards:
- Identify where the data they need lives.
- Collect it from the source systems and bring it into our own possession.
- Process it: quality checks, standardization, and preparing and modelling the data to the consumers' requirements.
- Facilitate consumption, so the consumers' systems can use the prepared data.
Most data engineering projects come down to this: connecting data owners and data consumers with the right data, at the right frequency, at the right time.
The Reference Architecture
Now that we know who is involved, let's put them on one picture. This is the data engineering platform reference architecture. It shows where the data engineering team fits and what it does.
Data engineering platform reference architecture: data sources, then data integration, data processing and an analytical store run by the data engineering team, then data consumers, with batch and streaming approaches
Read it from left to right. The diagram has three zones, and the labels under it tell you who owns each one.
| Zone | Who owns it | What is in it |
|---|---|---|
| Data sources (left) | Business data owners. This is the operations side of the business. | Enterprise applications, databases, websites, file servers, mobile apps, and IoT devices. These are the systems that produce the data. |
| Data engineering functions (middle) | The data engineering team. | Data integration, data processing, and the analytical store. This is the part we build. |
| Data consumers (right) | The people who consume the data. This is the optimization side of the business. | Reporting and analytics, built on the prepared data. |
The data flows from the sources, through the middle zone, to the consumers. Inside the middle zone, the data goes through three functions in order.
The functions of a data engineering project
| Function | What happens | Also called |
|---|---|---|
| 1. Data integration | Collect data from the source systems and bring it into the data engineering team's own platform. Once collected, we own the data. | Data ingestion, data collection |
| 2. Data processing | Prepare the data to the consumers' requirements. This is the largest and most complex part of a project, and it's what gives data engineering its name. | Data engineering, data transformation |
| 3. Analytical store | Model the data and set up the connectivity consumers need, for example data marts and other analytical stores. | Data marts, data modelling |
The consumers always have a requirement such as "we want the data in this model or this format". The analytical store is where we meet it.
The approaches
Along the bottom of the middle zone, the diagram shows the approaches. Every function can be implemented in one of three ways, and some projects mix them.
| Approach | When data is processed |
|---|---|
| Batch processing | At regular intervals, for example daily, hourly, or every 30 minutes |
| Near real-time stream processing | Continuously, with a short delay |
| Real-time stream processing | Continuously, as quickly as the data is produced |
This course assumes you already know the difference between batch and stream processing.
The reference architecture tells us what a data engineering platform does. It doesn't tell us how to organize the work inside it, or which technologies to use. That's what the next architecture adds.
The Lakehouse Medallion Architecture
The medallion architecture is the reference architecture filled in for a modern platform. The sources, the ingestion, and the consumers are still there. What's new is how the middle zone is organized: in layers, built with Apache Spark and Databricks. This is known as the lakehouse medallion architecture.
Lakehouse medallion architecture: sources feed data ingestion in batch or stream mode, then bronze, silver and gold layers built with Apache Spark and Databricks, then apps, BI reports and ML models
Read it from left to right.
Ingestion. The first function is data ingestion. You choose an ingestion tool that suits each source. Ingestion can run in batch mode, collecting data at regular intervals, or in streaming mode, collecting data continuously as the source produces it. The architecture supports both, and you can mix them: some data in batch, some as a stream.
Layers. After ingestion, the architecture recommends building the rest of the solution in layers. The minimum is three.
| Layer | What it holds |
|---|---|
| Bronze | The raw data, exactly as it was ingested. The rest of the solution starts from here. |
| Silver | Data read from bronze, processed and improved. This is the high-quality data. |
| Gold | Data prepared for consumption, fitted into the data models the consumers want. |
You ingest the data and then build the solution step by step across the layers, from bronze to silver to gold. Each step can run in batch mode, near real-time mode, or real-time streaming mode.
What Comes Next
How do we build this architecture technically? Which technologies and components do we use? That is what this course is about. We will implement the lakehouse medallion architecture using Apache Spark and Databricks, and we start with Apache Spark in the next lecture.
Summary
- Business data owners capture data, data consumers use it, and data engineers connect the two.
- The reference architecture shows the sources on the left, the data engineering team's functions in the middle, and the consumers on the right.
- A data engineering project has three functions: ingestion, processing, and an analytical store that models data for consumption.
- Projects use batch, near real-time, or real-time approaches.
- The lakehouse medallion architecture organizes the solution into bronze, silver, and gold layers.
See you in the next lecture. Keep learning, and keep growing!