Spark
Lab
/ practice / quiz / spark-sql
Overview
Learn
Modules
Practice
Cheatsheets
Search lessons & terms…
⌘K
0/39 lessons
Practice
Module 03 quiz · 8 questions
Spark SQL with PySpark
Spark SQL with PySpark · Question 1 of 8
In one session you run orders_df.createOrReplaceTempView("orders"). A second session in the same application, created with spark.newSession(), runs SELECT count(*) FROM orders. What happens?
A
It returns the same count — temp views are shared by the whole application
B
It fails with TABLE_OR_VIEW_NOT_FOUND — temp views are scoped to the session that created them
C
It returns 0 — the view exists in every session, but its data is cached only in the first one
D
It works only after the first session calls spark.catalog.refreshTable("orders")