DataFrames can easily be manipulated with SQL queries in Spark.
In this recipe, we will learn how to create a temporary view so you can access the data within DataFrame using SQL.
DataFrames can easily be manipulated with SQL queries in Spark.
In this recipe, we will learn how to create a temporary view so you can access the data within DataFrame using SQL.
To execute this recipe, you need to have a working Spark 2.3 environment. You should have gone through the previous recipe, as we will be using the sample_data_schema DataFrame we created there.
There are no other requirements.
We simply use the .createTempView(...) method of a DataFrame:
sample_data_schema.createTempView('sample_data_view...