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
Big Data on Kubernetes

You're reading from   Big Data on Kubernetes A practical guide to building efficient and scalable data solutions

Arrow left icon
Product type Paperback
Published in Jul 2024
Publisher Packt
ISBN-13 9781835462140
Length 296 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Author (1):
Arrow left icon
Neylson Crepalde Neylson Crepalde
Author Profile Icon Neylson Crepalde
Neylson Crepalde
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Part 1:Docker and Kubernetes FREE CHAPTER
2. Chapter 1: Getting Started with Containers 3. Chapter 2: Kubernetes Architecture 4. Chapter 3: Getting Hands-On with Kubernetes 5. Part 2: Big Data Stack
6. Chapter 4: The Modern Data Stack 7. Chapter 5: Big Data Processing with Apache Spark 8. Chapter 6: Building Pipelines with Apache Airflow 9. Chapter 7: Apache Kafka for Real-Time Events and Data Ingestion 10. Part 3: Connecting It All Together
11. Chapter 8: Deploying the Big Data Stack on Kubernetes 12. Chapter 9: Data Consumption Layer 13. Chapter 10: Building a Big Data Pipeline on Kubernetes 14. Chapter 11: Generative AI on Kubernetes 15. Chapter 12: Where to Go from Here 16. Index 17. Other Books You May Enjoy

Building a batch pipeline

For the batch pipeline, we will use the IMBD dataset we worked on in Chapter 5. We are going to automate the whole process from data acquisition and ingestion into our data lake on Amazon Simple Storage Service (Amazon S3) up to the delivery of consumption-ready tables in Trino. In Figure 10.1, you can see a diagram representing the architecture for this section’s exercise:

Figure 10.1 – Architecture design for a batch pipeline

Figure 10.1 – Architecture design for a batch pipeline

Now, let’s get to the code.

Building the Airflow DAG

Let’s start developing our Airflow DAG as usual. The complete code is available at https://github.com/PacktPublishing/Bigdata-on-Kubernetes/tree/main/Chapter10/batch/dags folder:

  1. The first lines of the Airflow DAG are shown next:

    imdb_dag.py

    from airflow.decorators import task, dag
    from airflow.utils.task_group import TaskGroup
    from airflow.providers.cncf.kubernetes.operators.spark_kubernetes import SparkKubernetesOperator...
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