Create materialized views

A materialized view is an aggregation query over a source table, or over another materialized view. It represents a single summarize statement. There are two types of materialized views:

  • Empty materialized view: it includes records ingested after view creation. A creation of this kind returns immediately, with the view instantly being available for query.
  • Materialized view based on existing records in the source table: Creation might take a long while to complete, depending on the number of records in the source table.

For more information on materialized views, see Materialized view overview.

In this article, you learn how to create materialized views using the .create materialized-view command.

For more information on the .create materialized-view command, see .create materialized-view.

Prerequisites

Materialized view

  1. Browse to your KQL database, and select +New > Materialized view.

    Screenshot of a KQL database landing page showing the New option dropdown menu, with the option titled Materialized view highlighted.

    The materialized view command is populated in the Explore your data window.

  2. Enter the table name and query statement of your materialized view instead of the placeholder text, and then select Run.

    Screenshot of Explore your data window showing an example of a materialized view command.

    Materialized views appear under Materialized views in the Explorer pane.

    Screenshot of Explorer pane showing the database entities in Real-Time Intelligence. The dropdown list of materialized views is highlighted.