View
View(name, select, *, table=None, lifecycle=Lifecycle.managed, registry=default_registry)
A simple view or a materialized view in ClickHouse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The name of the view. |
required |
select
|
Query | str
|
The query to select rows from the table. |
required |
table
|
Table | None
|
The table to materialize or None for a simple view. |
None
|
lifecycle
|
Lifecycle
|
The lifecycle of the view. Defaults to Lifecycle.managed. |
managed
|
registry
|
Registry
|
The registry to register the view with. Defaults to the global registry. |
default_registry
|
is_materialized
property
Return True if the view is materialized, False otherwise.
name = name
instance-attribute
select = select
instance-attribute
table = table
instance-attribute
get_lifecycle()
Return the lifecycle of the view.
get_name()
Return the name of the view.