Spark SQL is the Spark component for structured data ...
29/04/2020
Spark SQL is the Spark component for structured data processing
It provides a programming abstraction called Dataset and can act as a distributed SQL query engine
The input data can be queried by using
Ad-hoc methods Or an SQL-like language
2
1
29/04/2020
The interfaces provided by Spark SQL provide more information about the structure of both the data and the computation being performed
Spark SQL uses this extra information to perform extra optimizations based on an "SQL-like" optimizer called Catalyst
=> Programs based on Datasets are usually faster than standard RDD-based programs
3
RDD
vs
Unstructured
DataFrame
Structured
Distributed list of objects
~Distributed SQL table
4
2
29/04/2020
Dataset
Distributed collection of structured data
It provides the benefits of RDDs
Strong typing Ability to use powerful lambda functions
And the benefits of Spark SQL's optimized execution engine exploiting the information about the data structure
Compute the best execution plan before executing the code
5
DataFrame
A "particular" Dataset organized into named columns
It is conceptually equivalent to a table in a relational database
It can be created reading data from different types of external sources (CSV files, JSON files, RDBMs, ..)
It is not characterized by the strong typing feature
A DataFrame is simply a Dataset of Row objects
i.e., DataFrame is an alias for Dataset
6
3
29/04/2020
All the Spark SQL functionalities are based on an instance of the org.apache.spark.sql.SparkSession class
To instance a SparkSession object use the SparkSession.builder() method
SparkSession ss = SparkSession.builder().appName("App.Name").getOrCreate();
7
To "close" a Spark Session use the SparkSession.stop() method
ss.stop();
8
4
29/04/2020
DataFrame
It is a distributed collection of data organized into named columns
It is equivalent to a relational table
DataFrames are Datasets of Row objects, i.e., Dataset
Classes used to define DataFrames
org.apache.spark.sql.Dataset; org.apache.spark.sql.Row;
10
5
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- spark sql is the spark component for structured data
- 1 apache spark brigham young university
- big data frameworks scala and spark tutorial
- spark sql relational data processing in spark
- transformations and actions databricks
- introduction to scala and spark sei digital library
- scaling spark in the real world performance and usability
- data science in spark with sparklyr cheat sheet
- spark big data processing framework
Related searches
- which is the word equation for photosynthesis
- what is the balanced equation for photosynthesis
- what is the correct formula for photosynthesis
- what is the simplified equation for photosynthesis
- what is the fashion trend for 2019
- what is the balanced equation for photos
- what is the chemical formula for photosynthesis
- what is the overall reaction for photosynthesis
- what is the best job for me
- what is the overall equation for photosynthesis
- what is the best plan for savings for retirement