-
Book Overview & Buying
-
Table Of Contents
Data Engineering with Azure Databricks
By :
Data engineering has changed fast in the last few years. Companies now deal with more data than ever before. They need systems that can handle batch and streaming data, enforce data quality, and scale without breaking. Azure Databricks has become one of the most popular platforms for building these systems.
Azure Databricks combines the power of Apache Spark with the convenience of a managed cloud service on Microsoft Azure. It gives you Delta Lake for reliable data storage, Structured Streaming for real-time processing, and Unity Catalog for data governance. Together, these tools let you build data pipelines that are fast, reliable, and secure.
This book takes you on a hands-on journey through data engineering on Azure Databricks. You will start with the basics: setting up your environment, understanding the platform, and learning how to bring data in. Then you will go deeper into Spark, streaming, and Delta Lake. You will learn how to automate pipelines with Spark Declarative Pipelines and orchestrate workflows for production.
The second half of the book focuses on real-world operations. You will set up CI/CD pipelines, optimize query performance, manage costs, and secure your data with Unity Catalog. The final chapter introduces machine learning and generative AI on Databricks, showing where data engineering meets AI.
We wrote this book to share what we have learned from building data solutions for companies in retail, finance, healthcare, and manufacturing. Every example in this book comes from real problems we have solved. Our goal is simple: help you build data pipelines that work well and grow with your needs.
Whether you are new to Azure Databricks or already use it in production, this book will give you practical knowledge you can apply right away.
This book is for data engineers, data architects, and developers who want to build scalable data pipelines on Azure Databricks. It is also useful for data analysts and data scientists working with data engineering teams who want to better understand the platform.
You should have a basic understanding of SQL and Python before you start. Some knowledge of cloud computing and Apache Spark will help, but it is not required. We explain core concepts as we go. No prior experience with Azure Databricks is needed.
Chapter 1, The Role of Azure Databricks in Modern Data Engineering, introduces Azure Databricks and its place in the modern data stack. You will learn about the platform's core features, workspaces, clusters, and notebooks, and see common use cases for building scalable data solutions.
Chapter 2, Setting Up an End-to-End Azure Databricks Environment, walks you through creating and configuring Databricks workspaces, clusters, and access controls. You will also connect to Azure data services and set up Unity Catalog for centralized data governance.
Chapter 3, Data Ingestion Strategies for Azure Databricks, explores how to load data into Databricks using batch and streaming methods. You will learn to use Auto Loader for incremental ingestion and connect to external sources such as databases, APIs, and Event Hubs.
Chapter 4, Deep Dive into Apache Spark on Azure Databricks, gives you a solid understanding of Spark architecture and how to optimize performance. You will write efficient PySpark code and learn techniques like partitioning and caching for large-scale data processing.
Chapter 5, Building Real-Time Data Pipelines, teaches you how to build streaming data pipelines with Apache Spark Structured Streaming. You will handle stateful streaming, manage late-arriving data, and implement fault-tolerant real-time processing in Databricks.
Chapter 6, Working with Delta Lake: ACID Transactions and Schema Evolution, focuses on Delta Lake as a reliable storage layer. You will learn about ACID transactions, schema enforcement, time travel, and Change Data Capture for building consistent data pipelines.
Chapter 7, Automating Data Pipelines with Spark Declarative Pipelines, shows you how to build declarative data pipelines using Spark Declarative Pipelines. You will set up data quality expectations, monitor pipeline health, and optimize SDP performance.
Chapter 8, Orchestrating Data Workflows: From Notebooks to Production, covers end-to-end data workflow management. You will use Databricks Jobs for scheduling, integrate with Azure Data Factory and Apache Airflow, and learn best practices for production deployments.
Chapter 9, CI/CD and DevOps for Azure Databricks, explores continuous integration and deployment practices. You will set up Git integration, build CI/CD pipelines with Azure DevOps, use Declarative Automation Bundles, and automate testing and deployment.
Chapter 10, Optimizing Query Performance and Cost Management, teaches you how to tune Spark and Delta Lake queries for speed and efficiency. You will learn about Adaptive Query Execution, caching strategies, autoscaling clusters, and techniques to manage cloud costs.
Chapter 11, Security, Compliance, and Data Governance, covers securing your Databricks environment. You will implement role-based access control, data encryption, and auditing. You will also use Unity Catalog for column-level security, data lineage, and compliance with regulations such as GDPR and HIPAA.
Chapter 12, Machine Learning and AI on Databricks, introduces the platform's AI and ML capabilities. You will explore MLflow for experiment tracking, Feature Store for feature engineering, AutoML for automated model training, and generative AI applications, including RAG and LLM fine-tuning.
To follow the examples in this book, you will need the following:
All code examples in this book are designed to run on Azure Databricks. You do not need to install Apache Spark or any other big data tools on your local machine. Each chapter includes step-by-step instructions for setting up the required resources.
This book includes a complete downloadable code bundle containing all the example projects and files used throughout the chapters. We recommend downloading the bundle so you can follow along smoothly and experiment with the examples.
Use the bundle as a practical starting point. Modify it, extend it, and apply what you learn by creating your own variations as you progress through the chapters.
Get the code bundle
If you bought the book directly from Packt:
If you bought this book from Amazon or any other channel partner:

Usage note: You're free to use and modify this code for personal learning and non-commercial projects.
We also provide a PDF file that has color images of the screenshots and diagrams used in this book. You can download it here:https://packt.link/gbp/978-1-80610-637-0.
This book uses several text conventions.
CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. For example: "Use the spark.read.format() method to load data from Delta Lake."
A block of code is set as follows:
df = spark.read.format("delta").load("/mnt/data/sales")
df_filtered = df.filter(df.amount > 100).groupBy("region").sum("amount")
df_filtered.write.format("delta").mode("overwrite").save("/mnt/data/output")
Any command-line input or output is written as follows:
databricks clusters list --output TABLE
Bold: Indicates a new term, an important word, or words that you see on the screen. For instance, words in menus or dialog boxes appear in the text like this. For example: "Select System info from the Administration panel."
Warnings or important notes appear like this.
Tips and tricks appear like this.
Feedback from our readers is always welcome.
General feedback: If you have questions about any aspect of this book or have any general feedback, please email us at customercare@packt.com and mention the book's title in the subject of your message.
Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you reported this to us. Please visit http://www.packt.com/submit-errata, click Submit Errata, and fill in the form.
Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.
If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit http://authors.packt.com/.
Change the font size
Change margin width
Change background colour