QuestionQ116

VerifiedUsing Spark SQL

A Data Engineer created the users_vw view with the following code:

df.createOrReplaceTempView("users_vw")  

Which method can be used to query the users_vw view after the session has ended?

Explanation

A local temporary view created by createOrReplaceTempView is scoped to the SparkSession and is automatically removed when that session ends. It must be recreated in a new session before it can be queried with Spark.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!