Correct Answer: B
Before issuing SQL queries, DataFrame needs to be saved as a table or temporary view. createOrReplaceTempView function is used to create the temporary view.
Option A is incorrect. There is no DataFrame method like createTempView.
Option B is correct. createOrReplaceTempView function is used to create the temporary view.
Option C is incorrect. There is no such method as ReplaceTempView.
Option D is incorrect. There is no such method as createTempViewForDataFrame.
Option E is incorrect. There is no DataFrame method like CreateorReplaceDFTempView.
Reference:
To know more about DataFrames, please visit the below-given link:
https://docs.microsoft.com/en-us/azure/databricks/getting-started/spark/dataframes