6. 2- Temporary view
u Session-scoped view
u CREATE TEMP VIEW view_name
AS query
7. Spark Session
u Opening a new notebook
u Detaching and reattaching to a cluster
u Installing a python package
u Restarting a cluster
8. 3- Global Temporary views
u Cluster-scoped view
u CREATE GLOBAL TEMP VIEW view_name
AS query
u SELECT * FROM global_temp.view_name
9. Views comparison
(Stored) Views
u Persisted in DB
u Dropped only by
DROP VIEW
u CREATE VIEW
Global Temp views
u Cluster-scoped
u dropped when
cluster restarted
u CREATE GLOBAL
TEMP VIEW
Temp views
u Session-scoped
u dropped when
session ends
u CREATE TEMP VIEW