Many Rows, One Plan
An Independent Guide to Data Engineering and AI Workloads with Apache Spark
-
- $0.99
-
- $0.99
Publisher Description
An independent, practical guide to using Apache Spark, the open-source distributed data engine, for the work that data and AI teams do today: batch pipelines, streaming, machine learning and batch inference with language models. One fictional electricity cooperative runs through the book, with about 180,000 smart meters, 40 substations and four workloads: daily meter rollups, streaming outage detection, load forecasting and labeling of customer call notes. You will learn when a distributed engine is worth its overhead, how applications run as jobs, stages and tasks, how to declare schemas and handle ANSI SQL errors, and how to read query plans. Everyday chapters cover built-in functions, aggregations, window functions and joins, SQL, catalogs and open table formats, file layouts that read fast and rerun safely, Python and pandas functions accelerated by Arrow, and the pandas API on Spark. Later chapters diagnose partitioning, memory and skew problems, build streaming queries with watermarks, custom state, timers and real-time mode, and use Spark Connect and Declarative Pipelines securely. The final part trains and evaluates a forecast with MLlib, runs in-cluster and service-based inference under limits on concurrency, cost and privacy, and covers testing, operations, security and upgrades. Written for release 4.3. Includes a hands-on lab, a cheat sheet, a troubleshooting table, review questions with answers and a glossary.