O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Learning PySpark

Video Description

Building and deploying data-intensive applications at scale using Python and Apache Spark

About This Video

  • Practical techniques to help you combine the power of Python and Apache Spark to process your data efficiently
  • Overcome any challenge when it comes to developing and deploying efficient, scalable, real-time Spark solutions
  • Take your understanding of using Spark with Python to the next level with this hands-on video

In Detail

Apache Spark is an open-source distributed engine for querying and processing data. In this tutorial, we provide a brief overview of Spark and its stack. This tutorial presents effective, time-saving techniques on how to leverage the power of Python and put it to use in the Spark ecosystem. You will start by getting a firm understanding of the Apache Spark architecture and how to set up a Python environment for Spark.

You'll learn about different techniques for collecting data, and distinguish between (and understand) techniques for processing data. Next, we provide an in-depth review of RDDs and contrast them with DataFrames. We provide examples of how to read data from files and from HDFS and how to specify schemas using reflection or programmatically (in the case of DataFrames). The concept of lazy execution is described and we outline various transformations and actions specific to RDDs and DataFrames.

Finally, we show you how to use SQL to interact with DataFrames. By the end of this tutorial, you will have learned how to process data using Spark DataFrames and mastered data collection techniques by distributed data processing.

Table of Contents

  1. Chapter 1 : A Brief Primer on PySpark
    1. The Course Overview 00:05:53
    2. Brief Introduction to Spark 00:02:05
    3. Apache Spark Stack 00:01:39
    4. Spark Execution Process 00:01:26
    5. Newest Capabilities of PySpark 2.0+ 00:01:56
    6. Cloning GitHub Repository 00:01:56
  2. Chapter 2 : Resilient Distributed Datasets
    1. Brief Introduction to RDDs 00:01:49
    2. Creating RDDs 00:04:38
    3. Schema of an RDD 00:02:17
    4. Understanding Lazy Execution 00:02:11
    5. Introducing Transformations – .map(…) 00:03:58
    6. Introducing Transformations – .filter(…) 00:02:23
    7. Introducing Transformations – .flatMap(…) 00:06:14
    8. Introducing Transformations – .distinct(…) 00:03:27
    9. Introducing Transformations – .sample(…) 00:03:15
    10. Introducing Transformations – .join(…) 00:04:18
    11. Introducing Transformations – .repartition(…) 00:04:17
  3. Chapter 3 : ChapterName
    1. Introducing Actions – .take(…) 00:05:43
    2. Introducing Actions – .collect(…) 00:02:15
    3. Introducing Actions – .reduce(…) and .reduceByKey(…) 00:03:00
    4. Introducing Actions – .count() 00:02:37
    5. Introducing Actions – .foreach(…) 00:01:51
    6. Introducing Actions – .aggregate(…) and .aggregateByKey(…) 00:04:55
    7. Introducing Actions – .coalesce(…) 00:02:06
    8. Introducing Actions – .combineByKey(…) 00:03:11
    9. Introducing Actions – .histogram(…) 00:01:50
    10. Introducing Actions – .sortBy(…) 00:02:39
    11. Introducing Actions – Saving Data 00:03:11
    12. Introducing Actions – Descriptive Statistics 00:02:14
  4. Chapter 4 : ChapterName
    1. Introduction 00:01:42
    2. Creating DataFrames 00:04:09
    3. Specifying Schema of a DataFrame 00:06:00
    4. Interacting with DataFrames 00:01:36
    5. The .agg(…) Transformation 00:03:20
    6. The .sql(…) Transformation 00:03:57
    7. Creating Temporary Tables 00:02:31
    8. Joining Two DataFrames 00:03:54
    9. Performing Statistical Transformations 00:03:55
    10. The .distinct(…) Transformation 00:01:30
  5. Chapter 5 : ChapterName
    1. Schema Changes 00:06:29
    2. Filtering Data 00:01:31
    3. Aggregating Data 00:02:34
    4. Selecting Data 00:02:24
    5. Transforming Data 00:01:41
    6. Presenting Data 00:01:34
    7. Sorting DataFrames 00:01:01
    8. Saving DataFrames 00:04:28
    9. Pitfalls of UDFs 00:03:39
    10. Repartitioning Data 00:01:59