Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Spark SQL

You're reading from   Learning Spark SQL Architect streaming analytics and machine learning solutions

Arrow left icon
Product type Paperback
Published in Sep 2017
Publisher Packt
ISBN-13 9781785888359
Length 452 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Aurobindo Sarkar Aurobindo Sarkar
Author Profile Icon Aurobindo Sarkar
Aurobindo Sarkar
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Getting Started with Spark SQL FREE CHAPTER 2. Using Spark SQL for Processing Structured and Semistructured Data 3. Using Spark SQL for Data Exploration 4. Using Spark SQL for Data Munging 5. Using Spark SQL in Streaming Applications 6. Using Spark SQL in Machine Learning Applications 7. Using Spark SQL in Graph Applications 8. Using Spark SQL with SparkR 9. Developing Applications with Spark SQL 10. Using Spark SQL in Deep Learning Applications 11. Tuning Spark SQL Components for Performance 12. Spark SQL in Large-Scale Application Architectures

Using SparkR for EDA and data munging tasks


In this section, we will use Spark SQL and SparkR for preliminary exploration of our Datasets. The examples in this chapter use several publically available Dataset to illustrate the operations and be run in the SparkR shell.

The entry point into SparkR is the SparkSession. It connects the R program to a Spark cluster. If you are working in the SparkR shell, the SparkSession is already created for you.

At this time, start SparkR shell, as shown:

Aurobindos-MacBook-Pro-2:spark-2.2.0-bin-hadoop2.7 aurobindosarkar$./bin/SparkR

You can install the required libraries, such as ggplot2, in your SparkR shell, as shown:

> install.packages('ggplot2', dep = TRUE)

Reading and writing Spark DataFrames

SparkR supports operating on a variety of sources through the DataFrames interface. SparkR's DataFrames supports a number of methods to read input, perform structured data analysis, and write DataFrames to the distributed storage.

The read.df method can be used...

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 $19.99/month. Cancel anytime
Banner background image