Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Data Engineering with Databricks Cookbook

You're reading from   Data Engineering with Databricks Cookbook Build effective data and AI solutions using Apache Spark, Databricks, and Delta Lake

Arrow left icon
Product type Paperback
Published in May 2024
Publisher Packt
ISBN-13 9781837633357
Length 438 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Pulkit Chadha Pulkit Chadha
Author Profile Icon Pulkit Chadha
Pulkit Chadha
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Preface 1. Part 1 – Working with Apache Spark and Delta Lake FREE CHAPTER
2. Chapter 1: Data Ingestion and Data Extraction with Apache Spark 3. Chapter 2: Data Transformation and Data Manipulation with Apache Spark 4. Chapter 3: Data Management with Delta Lake 5. Chapter 4: Ingesting Streaming Data 6. Chapter 5: Processing Streaming Data 7. Chapter 6: Performance Tuning with Apache Spark 8. Chapter 7: Performance Tuning in Delta Lake 9. Part 2 – Data Engineering Capabilities within Databricks
10. Chapter 8: Orchestration and Scheduling Data Pipeline with Databricks Workflows 11. Chapter 9: Building Data Pipelines with Delta Live Tables 12. Chapter 10: Data Governance with Unity Catalog 13. Chapter 11: Implementing DataOps and DevOps on Databricks 14. Index 15. Other Books You May Enjoy

To get the most out of this book

To follow along with the examples in this chapter, you will need to have the following:

  1. Install Docker Desktop as per the instructions at https://www.docker.com/products/docker-desktop/.

    If on Mac, make sure to choose the binary associated with your chip (Intel Chip or Apple Chip).

  2. Install Git as per the instructions at https://git-scm.com/book/en/v2/Getting-Started-Installing-Git.
  3. Clone the book’s repository locally by running the following:
    git clone https://github.com/PacktPublishing/Data-Engineering-with-Databricks-Cookbook.git
  4. Download and build the Docker images for the two nodes, one master spark cluster, and the JupyterLab notebook environment by running the following command in the cloned repository’s root folder:
    $ sh build.sh

Note

This may take several minutes the first time since it has to download and install Spark and all other supporting libraries on the base images.

  1. Start the local Apache Spark and JupyterLab notebook environment by running docker-compose from the root folder of the cloned repository:
    $ docker-compose up

This docker-compose file is creating a multi-container application that consists of the following services:

  • ZooKeeper: A service that provides coordination and configuration management for distributed systems.
  • Kafka: A service that provides a distributed streaming platform for publishing and subscribing to streams of data. It depends on ZooKeeper and uses port 9092. It allows plaintext listeners and has some custom configuration options.
  • JupyterLab: A service that provides an interactive web-based environment for data science and machine learning. It uses ports 8888 and 4040 and shares a local volume with the other services. It has a custom image, which includes Spark 3.4.1.
  • spark-master: A service that acts as the master node for a Spark cluster. It uses ports 8080 and 7077 and shares a local volume with the other services. It has a custom image, which includes Spark 3.4.1.
  • spark-worker-1 and spark-worker-2: Two services that act as worker nodes for the Spark cluster. They depend on spark-master and use port 8081. They have custom images, which include Spark 3.4.1 and some environment variables to specify the worker cores and memory.

To run this docker-compose file, you need to have the following minimum system requirements:

  • Docker Engine version 18.02.0+ and Docker Compose version 1.25.5+
  • At least 6 GB of RAM and 10 GB of disk space
  • A Linux, Mac, or Windows operating system that supports Docker

The system requirements in order to follow the recipes are as follows:

Software/Hardware covered in the book

OS requirements

Docker Engine version 18.02.0+

Windows, Mac OS X, and Linux (any)

Docker Compose version 1.25.5+

Docker Desktop

Git

If you are using the digital version of this book, we advise you to type the code yourself or access the code via the GitHub repository (link available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image