Introduction to Spark SQL and DataFrames
1h 53mIntermediate2019-05-30
Authors

Dan Sullivan
Enterprise Architect, Big Data Expert
Course details
Explore DataFrames, a widely used data structure in Apache Spark. DataFrames allow Spark developers to perform common data operations, such as filtering and aggregation, as well as advanced data analysis on large collections of distributed data. With the addition of Spark SQL, developers have access to an even more popular and powerful query language than the built-in DataFrames API. In this course, instructor Dan Sullivan shows how to perform basic operations—loading, filtering, and aggregating data in DataFrames—with the API and SQL, as well as more advanced techniques that are easily performed in SQL. In this section of the course, Dan explains how to join data, eliminate duplicates, and deal with null or NA values. The lessons conclude with three in-depth examples of using DataFrames for data science: exploratory data analysis, time series analysis, and machine learning.
Learning objectives
Installing Spark and PySpark
Setting up a Jupyter notebook
Loading data into DataFrames
Filtering, aggregating, and saving data
Querying and modifying DataFrames with SQL
Exploratory data analysis
Basic machine learning
Learning objectives
Installing Spark and PySpark
Setting up a Jupyter notebook
Loading data into DataFrames
Filtering, aggregating, and saving data
Querying and modifying DataFrames with SQL
Exploratory data analysis
Basic machine learning
Skills covered
Apache SparkApacheSQLDatabase AdministrationIntroduction toData EngineeringDatabase DevelopmentDatabase ManagementData AnalysisProgramming LanguagesData ScienceBusiness Analysis and StrategyBusiness Software and ToolsOpen SourceSoftware Development
Concepts
Introduction
- Apache Spark SQL and data analysis
- What you should know
Introduction to Spark DataFrames
- Introduction to DataFrames
- SQL for DataFrames
Installing Spark
- Install Spark
- Install PySpark
- Using Jupyter notebooks with PySpark
Getting Started with Spark DataFrames
- Set up a Jupyter notebook
- Load data into DataFrames - CSV Files
- Load data into DataFrames - JSON Files
- Basic DataFrame operations
- Filter data with DataFrame API
- Aggregate data with DataFrame API
- Sample data from DataFrames
- Save data from DataFrames
SQL for DataFrames
- Querying DataFrames with SQL
- Filtering DataFrames with SQL
- Aggregating Data with SQL
- Joining DataFrames with SQL
- Eliminating duplicates in DataFrames
- Working with NA values in DataFrames
Data Analysis with Spark
- Exploratory data analysis with DataFrames
- Exploratory data analysis with Spark SQL
- Timeseries analysis with DataFrames
- Basic machine learning with DataFrames, part 1
- Basic machine learning with DataFrames, part 2
Conclusion
- Next steps