Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Optimizing Databricks Workloads

You're reading from  Optimizing Databricks Workloads

Product type Book
Published in Dec 2021
Publisher Packt
ISBN-13 9781801819077
Pages 230 pages
Edition 1st Edition
Languages
Authors (3):
Anirudh Kala Anirudh Kala
Profile icon Anirudh Kala
Anshul Bhatnagar Anshul Bhatnagar
Profile icon Anshul Bhatnagar
Sarthak Sarbahi Sarthak Sarbahi
Profile icon Sarthak Sarbahi
View More author details

Table of Contents (13) Chapters

Preface 1. Section 1: Introduction to Azure Databricks
2. Chapter 1: Discovering Databricks 3. Chapter 2: Batch and Real-Time Processing in Databricks 4. Chapter 3: Learning about Machine Learning and Graph Processing in Databricks 5. Section 2: Optimization Techniques
6. Chapter 4: Managing Spark Clusters 7. Chapter 5: Big Data Analytics 8. Chapter 6: Databricks Delta Lake 9. Chapter 7: Spark Core 10. Section 3: Real-World Scenarios
11. Chapter 8: Case Studies 12. Other Books You May Enjoy

Learning Structured Streaming in Azure Databricks

Spark Structured Streaming provides a scalable and fault-tolerant approach to processing data in real-time. In Structured Streaming, Spark processes data in micro-batches to achieve low latencies. Syntactically, it looks very similar to batch processing. The same Spark DataFrame Transformations are used for streaming aggregations, joining static and streaming data, and more. Structured Streaming also guarantees exactly-once stream processing, which ensures that there is no duplication of data. Let's look at a quick example:

  1. Create a new Databricks notebook, start your Spark cluster, and run the following command:
    %fs ls dbfs:/databricks-datasets/structured-streaming/events/

    This displays a list of 50 JSON files that we will be reading using Structured Streaming.

    Figure 2.24 – Data to be read using Structured Streaming

  2. Run the following code block. It imports the necessary functions, defines the schema for the DataFrame...
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 $15.99/month. Cancel anytime}