pyspark.sql.Catalog.dropGlobalTempView

Catalog.dropGlobalTempView(viewName)[source]

Drops the global temporary view with the given view name in the catalog. If the view has been cached before, then it will also be uncached. Returns true if this view is dropped successfully, false otherwise.

New in version 2.1.0.

Examples

>>> spark.createDataFrame([(1, 1)]).createGlobalTempView("my_table")
>>> spark.table("global_temp.my_table").collect()
[Row(_1=1, _2=1)]
>>> spark.catalog.dropGlobalTempView("my_table")
>>> spark.table("global_temp.my_table") 
Traceback (most recent call last):
    ...
AnalysisException: ...