Skip to Main Content
Apache Spark Quick Start Guide
book

Apache Spark Quick Start Guide

by Shrey Mehrotra, Akash Grade
January 2019
Beginner to intermediate content levelBeginner to intermediate
154 pages
4h 31m
English
Packt Publishing
Content preview from Apache Spark Quick Start Guide

Datasets

Datasets are strongly typed collections of objects. These objects are usually domain-specific and can be transformed in parallel using relational or functional operations.

These operations are further categorized into actions and transformations. Transformations are functions that generate new datasets, while actions compute datasets and return the transformed results. Transformation functions include Map, FlatMap, Filter, Select, and Aggregate, while Action functions include count, show, and save to any filesystem.

The following instructions will help you create a dataset from a CSV file:

  1. Initialize SparkSession:
//Scalaimport org.apache.spark.sql.SparkSessionval spark = SparkSession.builder().appName("Spark DataSet example").config("spark.config.option", ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Debugging Apache Spark

Debugging Apache Spark

Holden Karau
Apache Spark 2.x for Java Developers

Apache Spark 2.x for Java Developers

Sumit Kumar, Sourav Gulati
Stream Processing with Apache Spark

Stream Processing with Apache Spark

Gerard Maas, Francois Garillot

Publisher Resources

ISBN: 9781789349108Supplemental Content