There has been a change for registration of a DataFrame as a table. Refer to this:
- For versions prior to Spark 2.0.0: registerTempTable()
- For Spark version 2.0.0 and previous: createOrReplaceTempView()
Pre-Spark 2.0.0 to register a DataFrame as a SQL table like artifact:
Before we can use the DataFrame for queries via SQL, we have to register the DataFrame as a temp table so the SQL statements can refer to it without any Scala/Spark syntax. This step may cause confusion for many beginners as we are not creating any table (temp or permanent), but the call registerTempTable() creates a name in SQL land that the SQL statements can refer to without additional UDF or without any domain-specific query language.
- Register the ...