.drop materialized-view
Drops a materialized view.
Requires Database Admin or materialized view admin permissions.
Syntax
.drop materialized-view MaterializedViewName [ifexists]
Note
If ifexists is specified, the command won't fail if it refers to a non-existent materialized view.
Properties
| Property | Type | Description |
|---|---|---|
| MaterializedViewName | String | Name of the Materialized View. |
Returns
The command returns the remaining materialized views in the database, which is the output of the show materialized view command.
Example
.drop materialized-view ViewName
Output
| Output parameter | Type | Description |
|---|---|---|
| Name | String | The name of the materialized view. |
| SourceTable | String | The source table of the materialized view. |
| Query | String | The materialized view query. |
| MaterializedTo | datetime | The max materialized ingestion_time() timestamp in source table. For more information, see how materialized views work. |
| LastRun | datetime | The last time materialization was run. |
| LastRunResult | String | Result of last run. Returns Completed for successful runs, otherwise Failed. |
| IsHealthy | bool | True when view is considered healthy, False otherwise. View is considered healthy if it was successfully materialized up to the last hour (MaterializedTo is greater than ago(1h)). |
| IsEnabled | bool | True when view is enabled (see Disable or enable materialized view). |
| Folder | string | The materialized view folder. |
| DocString | string | The materialized view doc string. |
| AutoUpdateSchema | bool | Whether the view is enabled for auto updates. |
| EffectiveDateTime | datetime | The effective date time of the view, determined during creation time (see .create materialized-view) |