September 2018
Intermediate to advanced
398 pages
9h 43m
English
Spark SQL is composed of three main APIs:
DataFrame is conceptually the same as a table in the relational database. The data is distributed in the same way as in an RDD. DataFrame has a schema but is untyped. You can create DataFrame from an RDD or manually build it. Once created, DataFrame will contain a schema that maintains the name and type for each column (field).
If you then want to use DataFrame in an SQL query, all you need to do is create a named view (equivalent to the table name in the relational database) using the Dataframe.createTempView(viewName: String) method. In the SQL query, the fields that are available in the SELECT statement will come from the schema of
Read now
Unlock full access