---
title: Monitor standalone materialized views
description: "Monitor standalone materialized views: view refresh status and history in Catalog Explorer, query the event log, and troubleshoot failed refreshes."
canonical_url: https://docs.databricks.com/gcp/en/sql/mv-st/materialized-monitor
---

# Monitor standalone materialized views

Monitor and query refresh data about a standalone materialized view using Catalog Explorer, `DESCRIBE EXTENDED`, or the pipeline event log.

## View the details of a single materialized view

You can view the details of a single materialized view by using the Catalog Explorer, or programmatically, with the `DESCRIBE EXTENDED` operation. You can also query the event log for details of the refresh history of a materialized view.

### View details in Catalog Explorer

You can access information about your materialized view by [viewing it in Catalog Explorer](https://docs.databricks.com/gcp/en/sql/mv-st/materialized-configure.md#view-mv-in-catalog-explorer). In Catalog Explorer, you can see the last refresh status and any refresh schedules created in SQL. For details on schedules created in SQL, see [CREATE MATERIALIZED VIEW](https://docs.databricks.com/gcp/en/sql/language-manual/sql-ref-syntax-ddl-create-materialized-view.md).

The Catalog Explorer shows details for each materialized view in a right-side pane, including:

1. **Current refresh status** and last run time. To see more details about the update, including run duration, any detailed errors, and the [refresh type](https://docs.databricks.com/gcp/en/ldp/incremental-refresh.md#determine-refresh-type) (including whether the materialized view was fully or incrementally refreshed and why), click **See refresh details**.
2. **Refresh Schedule**. If the materialized view has a schedule set via SQL, the schedule is shown. To update the schedule, use [ALTER MATERIALIZED VIEW](https://docs.databricks.com/gcp/en/sql/language-manual/sql-ref-syntax-ddl-alter-materialized-view.md).
3. **Tags**. To add custom [tags](https://docs.databricks.com/gcp/en/database-objects/tags.md), click **Add tags**. Tags are not automatically used to attribute costs, but you can manually create a query to connect custom tags to your costs. For details, see [Attribute costs to the SQL warehouse with custom tags](https://docs.databricks.com/gcp/en/sql/mv-st/materialized-monitor.md#costs-with-custom-tags).

There are properties of the materialized view that are not available in Catalog Explorer. For those properties, or to get the information programmatically, you can use the `DESCRIBE EXTENDED` command.

### <a id="view-status" />View details with `DESCRIBE EXTENDED`

> [!NOTE]
>
> The `DESCRIBE EXTENDED` command is not supported on dedicated compute. You must use standard compute to run `DESCRIBE EXTENDED` on a materialized view.

You can view details about a materialized view programmatically by using the `DESCRIBE EXTENDED` command. This includes details beyond what you get from the Catalog Explorer. They include:

* The status of the latest completed refresh.
* The refresh schedule.
* The columns of the materialized view.
* The refresh type of the materialized view (not available in Catalog Explorer).
* The data size for the materialized view, in total bytes (not available in Catalog Explorer).
* The storage location of the materialized view (not available in Catalog Explorer).
* Some information is only included in the result when enabled:
  * Clustering columns, if enabled.
  * Whether deletion vectors are enabled (only shown when `true`).
  * Whether row tracking is enabled (only shown when `true`).

```sql
-- As table:
DESCRIBE TABLE EXTENDED sales;

-- As a single JSON object:
DESCRIBE TABLE EXTENDED sales AS JSON;
```

### <a id="owner-event-log" />Query the event log programmatically

To get details about the refresh history for a materialized view, or the details as a refresh is happening, you can query the event log programmatically.

As the pipeline owner, you can create a *view* to allow others to query the event log for your pipeline. The following query creates a view that others can use to query the event log. This query uses the `TABLE` value function to query the correct event log table.

```sql
CREATE VIEW my_event_log_view AS
  SELECT *
  FROM event_log(TABLE(<catalog_name>.<schema_name>.<mv_name>));
```

To query the event log view, use a query like the following.

```sql
SELECT *
  FROM my_event_log_view
  WHERE event_type = "update_progress"
  ORDER BY timestamp desc;
```

To query the event log directly as the pipeline owner, you do not need to create a view. You can use the `TABLE` value function and query the data directly, such as the following sample query.

```sql
SELECT *
  FROM event_log(TABLE(<catalog_name>.<schema_name>.<mv_name>))
  WHERE event_type = "update_progress"
  ORDER BY timestamp desc;
```

For a full list of sample queries using the event log, see [Basic query examples](https://docs.databricks.com/gcp/en/ldp/monitor-event-logs.md#basic-query-examples).

## Monitor materialized view runs

You can monitor pipeline runs across your workspace, using the **Jobs & Pipelines** page, the **Query History** page, or programmatically by querying the event log. You can also set up notifications for scheduled pipelines.

### View all materialized view runs in the UI

If you use the **Jobs & Pipelines** page to monitor the status of different orchestration jobs across your workspace, you can also track all of the materialized views and streaming tables created there. Each standalone materialized view has a pipeline backing it. To see all of the materialized views and streaming tables that you have access to:

1. Click the ![Workflows icon.](https://docs.databricks.com/gcp/en/images/product-icons/WorkflowsIcon.svg) **Jobs & Pipelines** button on the left side of your workspace.
2. Click the **Pipelines** toggle button to filter your view to only pipelines.
3. Click **Pipeline type** button and select **MV/ST** to filter to only standalone pipelines.
4. Click the **Accessible by me** filter, to show all pipelines you have access to.

You are able to see all materialized views and streaming tables created across your org, including a summary view of the recent runs statuses. Clicking the name of a pipeline opens the pipeline monitoring details page to get more information. To learn more about the pipeline monitoring details page, see [Troubleshoot a failed refresh](https://docs.databricks.com/gcp/en/sql/mv-st/materialized-monitor.md#troubleshoot-failed-refresh).

To see the system managed jobs and pipelines for all of your scheduled materialized views in one place, use the **System Managed** tab of the **Jobs & Pipelines** list (Beta). See [View system managed jobs and pipelines in the Jobs & Pipelines list](https://docs.databricks.com/gcp/en/sql/mv-st/schedule-refreshes.md#system-managed-list).

### View runs using query history

If you’re more familiar with the **Query History** tab, you can also use it to view all previous runs of all queries where you have at least `CAN VIEW` access to the executing SQL warehouse. You can use the query history page to access query details and query profiles that can help you identify poorly performing queries and bottlenecks in the pipeline used to run your streaming table updates. For an overview of the kind of information available for query histories and query profiles, see [Query history](https://docs.databricks.com/gcp/en/sql/user/queries/query-history.md) and [Query profile](https://docs.databricks.com/gcp/en/sql/user/queries/query-profile.md).

All statements related to materialized views appear in the query history. You can use the **Statement** drop-down filter to select any command and inspect the related queries. All `CREATE` statements are followed by a `REFRESH` statement that executes asynchronously on a pipeline. The `REFRESH` statements typically include detailed query plans that provide insights into optimizing performance.

To access `REFRESH` statements in the query history UI, use the following steps:

1. Click ![History icon.](https://docs.databricks.com/gcp/en/images/product-icons/HistoryIcon.svg) **Query History** in the left sidebar.
2. Select the **REFRESH** checkbox from the **Statement** drop-down filter.
3. Click the name of the query statement to view summary details like the duration of the query and aggregated metrics.
4. Click **See query profile** to open the query profile. For details about navigating the query profile, see [Query profile](https://docs.databricks.com/gcp/en/sql/user/queries/query-profile.md).
5. Optionally, use the links in the **Query Source** section to open the related query or pipeline.

See [CREATE MATERIALIZED VIEW](https://docs.databricks.com/gcp/en/sql/language-manual/sql-ref-syntax-ddl-create-materialized-view.md).

### <a id="notifications" />Get notifications for scheduled refreshes

> [!NOTE]
> **Beta**
>
> The notifications for DDL scheduled refreshes feature is in [Beta](https://docs.databricks.com/gcp/en/release-notes/release-types.md). Workspace admins can control access to this feature from the **Previews** page by opting into the *System-Managed Job for Materialized Views & Streaming Tables* preview. See [Manage Databricks previews](https://docs.databricks.com/gcp/en/admin/workspace-settings/manage-previews.md).

When you create a schedule for your materialized view, you can edit it to get notifications. There are multiple ways to schedule materialized views, and getting notifications depends on which of these methods you choose:

* **Scheduled with a job**: To get notifications from a SQL task in Lakeflow Jobs, edit the task and add notifications. See [SQL task for jobs](https://docs.databricks.com/gcp/en/jobs/tasks/sql.md).

  You have a wide range of options for the notifications to received, and how to receive them. See [Add notifications on a job](https://docs.databricks.com/gcp/en/jobs/notifications.md)

* **Scheduled with a `SCHEDULE` clause**: To get notifications from a materialized view that is scheduled by a `SCHEDULE` clause in the SQL definition, edit it in the [Catalog Explorer](https://docs.databricks.com/gcp/en/catalog-explorer/index.md):
  1. Open the materialized view in Catalog Explorer.
  2. On the **Overview** tab, under **Refresh schedule**, click ![Pencil icon.](https://docs.databricks.com/gcp/en/images/product-icons/PencilIcon.svg) to edit the schedule you want to receive notifications for.
  3. Under **More options**, add or modify notifications.

     You have the option to get notified via email on start, success, or failure of the scheduled refresh. By default, the owner is notified on failure only.

## <a id="troubleshoot-failed-refresh" />Troubleshoot a failed refresh

You can find failing updates for materialized views (or streaming tables) by looking through the **Jobs & Pipelines** list. To troubleshoot a failed update, use the pipeline monitoring details page or the event log.

To troubleshoot a refresh that is full when you believe it should be incremental, first check that you [have row tracking enabled](https://docs.databricks.com/gcp/en/sql/mv-st/materialized.md#mv-row-tracking) for any source Delta tables. For other details about incremental refresh, see [Support for materialized view incremental refresh](https://docs.databricks.com/gcp/en/ldp/incremental-refresh.md#enzyme-support).

You can get additional details from the pipeline monitoring page, or by querying the event log programmatically.

### Using the pipeline monitoring page

To get more details about a materialized view (or streaming table) that has failed, you can use the pipeline monitoring page to debug issues. Each materialized view has a pipeline backing it. The pipeline monitoring page includes information, such as:

* The status of the last run and the run history.
* The last run duration.
* Whether the materialized view fully or incrementally refreshed. For more details on getting your materialized view to incrementally refresh, see [Support for materialized view incremental refresh](https://docs.databricks.com/gcp/en/ldp/incremental-refresh.md#enzyme-support).
* The event log for more detailed debugging. In the event that your materialized view failed to update or had other issues, click the [issues pane](https://docs.databricks.com/gcp/en/ldp/multi-file-editor.md#execution-insights) to view the logs in more detail.

To troubleshoot your materialized view:

1. In your workspace, click the ![Workflows icon.](https://docs.databricks.com/gcp/en/images/product-icons/WorkflowsIcon.svg) **Jobs & Pipelines** button on the left-navigation bar.
2. Click the name of your pipeline in the list.
3. If the update failed to run, the UI shows an error (or a list of errors) in the bottom pane.
4. Either click the button to **View Logs** or click the [issues pane](https://docs.databricks.com/gcp/en/ldp/multi-file-editor.md#execution-insights) to view the errors in more detail.
5. This opens the event log UI. Each error has a high-level message and summary, and a JSON tab with more details. To fix an issue with the Genie Code, click **Diagnose Error**.

For more details on the pipeline monitoring page, see [here](https://docs.databricks.com/gcp/en/ldp/monitoring-ui.md#pipeline-details).

### <a id="refresh-history" />Query the refresh history for a materialized view

The event log can be useful for setting up dashboards to monitor update status or duration across the workspace, or if you prefer programmatic monitoring over using the UI. Standalone materialized views do not support saving the event log to a metastore, so only the owner of the materialized view can query the event log directly.

To view the status of `REFRESH` operations on a materialized view, including current and past refreshes, query the pipeline event log:

```sql
SELECT *
FROM event_log(TABLE(<fully-qualified-table-name>))
WHERE event_type = "update_progress"
ORDER BY timestamp desc;
```

Replace `<fully-qualified-table-name>` with the fully qualified name of the materialized view, including the catalog and schema. If you are not the pipeline owner, you might need to first have a view created to query the event log. See [Query the event log programmatically](https://docs.databricks.com/gcp/en/sql/mv-st/materialized-monitor.md#owner-event-log).

### Query the type of refresh that occurred for a materialized view

Some queries can be incrementally refreshed. If an incremental refresh cannot be performed, a full refresh is performed instead.

To see the refresh type for a materialized view, query the event log:

```sql
SELECT timestamp, message
FROM event_log(TABLE(my_catalog.my_schema.sales))
WHERE event_type = 'planning_information'
ORDER BY timestamp desc;
```

Sample output for this command:

* * timestamp
  * message
* * `2025-03-21T22:23:16.497+00:00`
  * `Flow 'sales' has been planned to be executed as ROW_BASED.`

## <a id="costs-with-custom-tags" />Attribute costs to the SQL warehouse with custom tags

There are two ways tags relate to the billing records for a materialized view or streaming table, and they serve different purposes:

* **Warehouse tags** are inherited automatically from the SQL warehouse and propagate to the `custom_tags` column of `system.billing.usage`. Use these to attribute the cost of materialized view/streaming table refreshes back to the source SQL warehouse. This requires no manual joins.
* **Object-level tags** added to a materialized view or streaming table in Catalog Explorer attribute cost to the individual table, so you can group spend by a dimension you define on the object itself, such as team, project, or cost center. These tags are *not* automatically appended to billing records. To use them for cost attribution, manually join them from the `table_tags` system table, as described in [Join object-level tags manually](https://docs.databricks.com/gcp/en/sql/mv-st/materialized-monitor.md#join-object-level-tags-manually).

### Automatic warehouse tag propagation

A materialized view or streaming table in Databricks SQL runs on a serverless pipeline behind the scenes. That pipeline automatically picks up the custom tags from the enclosing warehouse that executes the statement, so refreshes get attributed the same way any other SQL statement would, with no extra joins needed to trace costs back to a warehouse. These tags show up directly in the `custom_tags` column of `system.billing.usage`.

Which warehouse's tags apply depends on how the refresh is triggered:

* **DDL refreshes** inherit the tags of the warehouse that executed the DDL statement (the `CREATE` or `CREATE OR REPLACE` defining the materialized view/streaming table).
* **Ad-hoc refreshes and refreshes triggered by a Lakeflow Jobs SQL task** inherit the tags of the warehouse that runs that refresh.

If a serverless usage policy and the warehouse tags define the same tag key, the usage policy tag wins. This matches the conflict-resolution behavior of serverless jobs.

To retag an existing materialized view or streaming table, run `CREATE OR REPLACE` (or `CREATE OR REFRESH`) from the warehouse whose tags you want to use. Scheduled refreshes pick up those tags.

Materialized views and Streaming tables created in Databricks SQL show up in billing with `billing_origin_product` set to `SQL` and a populated `usage_metadata.dlt_pipeline_id`. The following query pulls inherited warehouse tags and DBU usage for these records over the last 30 days:

```sql
SELECT
  usage_metadata.dlt_pipeline_id,
  custom_tags,
  SUM(usage_quantity) AS dbus
FROM system.billing.usage
WHERE billing_origin_product = 'SQL'
  AND usage_metadata.dlt_pipeline_id IS NOT NULL
  AND usage_date >= DATEADD(day, -30, current_date)
GROUP BY ALL
ORDER BY dbus DESC;
```

### <a id="join-object-level-tags-manually" />Join object-level tags manually

Tags added to a materialized view (or streaming table) in Catalog Explorer are not automatically appended to billing records, but you can manually join them to your billing information in a query.

After you have added tags to each materialized view (or streaming table) with Catalog Explorer, you can monitor the costs of materialized views by joining the [`table_tags`](https://docs.databricks.com/gcp/en/sql/language-manual/information-schema/table_tags.md) and [`billing`](https://docs.databricks.com/gcp/en/admin/system-tables/billing.md) system tables. This is a sample query to retrieve billing records for all materialized views and streaming tables created with Databricks SQL and append table-level tags:

```sql
SELECT
  u.*,
  tag_info.tags
FROM
  system.billing.usage u
LEFT JOIN (
  SELECT
    t.catalog_name,
    t.schema_name,
    t.table_name,
    collect_list(named_struct('tag_name', t.tag_name, 'tag_value', t.tag_value)) AS tags
  FROM
    main.information_schema.table_tags t
  GROUP BY
    t.catalog_name,
    t.schema_name,
    t.table_name
) tag_info
  ON tag_info.catalog_name = u.usage_metadata.uc_table_catalog
  AND tag_info.schema_name = u.usage_metadata.uc_table_schema
  AND tag_info.table_name = u.usage_metadata.uc_table_name
  WHERE usage_metadata.uc_table_name is not null;
```

You can use this same idea to join column tags from the `column_tags` table instead.
