Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Apache Spark 3 for Data Engineering & Analytics with Python
Rating: 4.6 out of 5(2,152 ratings)
11,856 students

Apache Spark 3 for Data Engineering & Analytics with Python

Learn how to use Python and PySpark 3.0.1 for Data Engineering / Analytics (Databricks) - Beginner to Ninja
Last updated 5/2022
English
English [Auto],French [Auto],

What you'll learn

  • Learn the Spark Architecture
  • Learn Spark Execution Concepts
  • Learn Spark Transformations and Actions using the Structured API
  • Learn Spark Transformations and Actions using the RDD (Resilient Distributed Datasets) API
  • Learn how to set up your own local PySpark Environment
  • Learn how to interpret the Spark Web UI
  • Learn how to interpret DAG (Directed Acyclic Graph) for Spark Execution
  • Learn the RDD (Resilient Distributed Datasets) API (Crash Course)
  • Learn the Spark DataFrame API  (Structured APIs)
  • Learn Spark SQL
  • Learn Spark on Databricks
  • Learn to Visualize (Graphs and Dashboards) Data on Databricks

Course content

5 sections89 lectures8h 39m total length
  • Introduction4:43

    Explore how Apache Spark enables fast, distributed data processing and machine learning with Python, Java, Scala, or R on a cluster.

  • The Spark Architecture3:39

    Explore how Apache Spark uses a master-slave architecture with a driver and workers, coordinated by a cluster manager and driven by Spark session and context.

  • The Spark Unified Stack3:36

    Explore the Apache Spark unified stack built on Spark Core, delivering batch and real-time streaming, SQL, machine learning, and graph processing with data frames.

  • Windows - Download Java2:29

    Install Java 8 to ensure compatibility for SPARC and Spark workflows, and download the JDK 8 Windows x64 from Oracle to avoid configuration headaches.

  • Windows - Install Java1:39

    Install Java eight by running the Java Development Kit installer, accepting license terms, and keeping the default installation directory.

  • Windows - Set up Java environment variables4:48

    Set up the Java home environment variable on Windows and update the PATH so Spark can locate Java, then verify the installation with java -version to confirm Java 8 is installed.

  • Windows - Download Python Installer1:11

    download Python 3.10 Windows 64-bit installer from python.org, and prepare to run the installation in the next lecture.

  • Windows - Install Python2:21

    Install the latest version of Python, customize the installer, create a dedicated C drive folder named Python, isolate Python, and complete installation to prepare the Python environment for Spark.

  • Windows - Set up PATH variable for Python5:10

    Configure the Windows PATH to point to the correct Python installation for Spark, then add python and python scripts to system environment variables and verify with the command prompt.

  • Windows - Install Spark for Python3:38

    install spark for Python on Windows by installing Java, Hadoop, and Python, then install Spark version 3.2.1 and set a new environment variable to point Spark to Python.

  • Windows - PySpark Test Program6:05

    Test a PySpark setup on Windows by running a small spark shell program, creating an RDD with two partitions, and printing the first five odd numbers.

  • Hadoop Installation5:26

    Install Hadoop on Windows to satisfy Spark dependencies using winutils to fake a Hadoop cluster, then create a Hadoop folder and set Hadoop home and path.

  • Install Microsoft Buid Tools2:35

    Install microsoft build tools to enable jupyter notebooks for python 3.9 by downloading and installing the C++ build tools via the Visual Studio installer, then restart.

  • Mac OS - Java Installation3:45

    Install and verify Java on Mac OS by downloading the JDK 15.0.2 for Mac OS, running the macOS installer, entering your password, and testing with java -version.

  • Mac OS - Python Installation4:16

    Install Python 3.9.1 on macOS to avoid compatibility issues, then verify with the terminal using python3 and run a small program that sums X and Y and prints Z.

  • Mac OS - PySpark Installation7:15

    Install pyspark on Mac OS using pip and verify the installation. Set environment variables in the zshrc to reference Python3 and pyspark drivers, then source the profile to apply changes.

  • Mac OS - Testing the Spark Installation5:06

    Test the Spark installation on macOS by writing a small Python program that creates an RDD from a range of numbers, partitions it, and filters odd numbers with a lambda.

  • Install Jupyter Notebooks9:18

    Install and run Jupyter Notebook to test Spark, set up a Spark context, create an rdd with 1000 numbers in two partitions, and print the first five odd numbers.

  • The Spark Web UI11:18

    Learn to use the Spark web UI to monitor a local Spark job, exploring stages and executables, and applying map transformations to square numbers in a sample program.

  • Section Summary2:23

    install a spark environment with java, python 3.9, and jupyter notebook, resolve c++ build tools to run notebook, and use the spok ui to monitor spark jobs and rdd libraries.

Requirements

  • A basic laptop PC running Windows or Mac OS with at least 6 - 8GB of RAM
  • Basic programming knowledge

Description

The key objectives of this course are as follows;

  • Learn the Spark Architecture

  • Learn Spark Execution Concepts

  • Learn Spark Transformations and Actions using the Structured API

  • Learn Spark Transformations and Actions using the RDD (Resilient Distributed Datasets) API

  • Learn how to set up your own local PySpark Environment

  • Learn how to interpret the Spark Web UI

  • Learn how to interpret DAG (Directed Acyclic Graph) for Spark Execution

  • Learn the RDD (Resilient Distributed Datasets) API (Crash Course)

    • RDD Transformations

    • RDD Actions

  • Learn the Spark DataFrame API  (Structured APIs)

    • Create Schemas and Assign DataTypes

    • Read and Write Data using the DataFrame Reader and Writer

    • Read Semi-Structured Data such as JSON

    • Create and New Data Columns to the DataFrame using Expressions

    • Filter the DataFrame using the "Filter" and "Where" Transformations

    • Ensure that the DataFrame has unique rows

    • Detect and Drop Duplicates

    • Augment the DataFrame by Adding New Rows

    • Combine 2 or More DataFrames

    • Order the DataFrame by Specific Columns

    • Renaming and Drop Columns from the DataFrame

    • Clean the DataFrame by detecting and Removing Missing or Bad Data

    • Create  User-Defined Spark Functions

    • Read and Write to/from Parquet File

    • Partition the DataFrame and Write to Parquet File

    • Aggregate the DataFrame using Spark SQL functions (count, countDistinct, Max, Min, Sum, SumDistinct, AVG)

    • Perform Aggregations with Grouping

  • Learn Spark SQL and Databricks

    • Create a Databricks Account

    • Create a Databricks Cluster

    • Create Databricks SQL and Python Notebooks

    • Learn Databricks shortcuts

    • Create Databases and Tables using Spark SQL

    • Use DML, DQL, and DDL with Spark SQL

    • Use Spark SQL Functions

    • Learn the differences between Managed and Unmanaged Tables

    • Read CSV Files from the Databricks File System

    • Learn to write Complex SQL

    • Use Spark SQL Functions

    • Create Visualisations with Databricks

    • Create a Databricks Dashboard


The Python Spark project that we are going to do together;

Sales Data

  • Create a Spark Session

  • Read a CSV file into a Spark Dataframe

  • Learn to Infer a Schema

  • Select data from the Spark Dataframe

  • Produce analytics that shows the topmost sales orders per Region and Country


Convert Fahrenheit to Degrees Centigrade

  • Create a Spark Session

  • Read and Parallelize data using the Spark Context into an RDD

  • Create a Function to Convert Fahrenheit to Degrees Centigrade

  • Use the Map Function to convert data contained within an RDD

  • Filter temperatures greater than or equal to 13 degrees celsius


XYZ Research

  • Create a set of RDDs that hold Research Data

  • Use the union transformation to combine RDDs

  • Learn to use the subtract transformation to minus values from an RDD

  • Use the RDD API to answer the following questions

    • How many research projects were initiated in the first three years?

    • How many projects were completed in the first year?

    • How many projects were completed in the first two years?


Sales Analytics

  • Create the Sales Analytics DataFrame to a set of CSV Files

  • Prepare the DataFrame by applying a Structure

  • Remove bad records from the DataFrame (Cleaning)

  • Generate New Columns from the DataFrame

  • Write a Partitioned DataFrame to a Parquet Directory

  • Answer the following questions and create visualizations using Seaborn and Matplotlib

    • What was the best month in sales?

    • What city sold the most products?

    • What time should the business display advertisements to maximize the likelihood of customers buying products?

    • What products are often sold together in the state "NY"?

Technology Spec

  1. Python

  2. Jupyter Notebook

  3. Jupyter Lab

  4. PySpark (Spark with Python)

  5. Pandas

  6. Matplotlib

  7. Seaborne

  8. Databricks

  9. SQL

Who this course is for:

  • Python Developers who wish to learn how to use the language for Data Engineering and Analytics with PySpark
  • Aspiring Data Engineering and Analytics Professionals
  • Data Scientists / Analysts who wish to learn an analytical processing strategy that can be deployed over a big data cluster
  • Data Managers who want to gain a deeper understanding of managing data over a cluster