Temporary views and tables

A temporary view registers a DataFrame under a name so it can be queried in SQL, for the duration of the session (createOrReplaceTempView). A table, managed by a catalog, persists data and metadata beyond the session. Views store no data: they only remember the query.

Example

df.createOrReplaceTempView('ventes')

Related concepts

The whole glossary