Skip to main content

Local metric views

Preview

This feature is in Public Preview.

Local metric views enable you to define dimensions, measures, and join relationships directly in an AI/BI dashboard using a visual interface. Local metric views retain all of the benefits of semantic objects, such as accurate metric aggregations regardless of groupings and query-time transformation rather than pre-processing, while keeping the semantic logic contained within a single dashboard.

They provide a location to house semantic logic that doesn't immediately belong in the global Unity Catalog layer, such as analysis specific to small teams or analysis that hasn't yet been hardened and prepared for broader use. When your metrics are ready for broader use, you can promote them to Unity Catalog to make them global metric views, accessible by all downstream tools.

Requirements

To use local metric views, your workspace must meet the following requirements:

  • The Dashboard Local Metric Views preview must be enabled for your workspace. A workspace admin can enable the feature from the Previews portal. See Manage Databricks previews.
  • You must have CAN USE permissions on a SQL warehouse.

When to use local metric views

Local metric views are best suited for the following scenarios:

  • Prototyping and iteration: Experiment with metric definitions without going through the Unity Catalog publishing process.
  • Dashboard-specific analysis: Define metrics scoped to a single dashboard that do not need to be shared across tools.
  • Users without Unity Catalog write access: Create and use metric views for dashboards without write permissions on a Unity Catalog catalog or schema.
  • Validation before promotion: Test and refine metric definitions before promoting them to Unity Catalog metric views.

For metrics that must be shared across multiple dashboards, Genie Spaces, or other tools, use Unity Catalog metric views instead. See Unity Catalog metric views.

Local metric views

Create a local metric view

You can create a local metric view from one or more tables, or by extending an existing Unity Catalog metric view with additional measures and dimensions.

Create from tables

To create a local metric view from tables:

  1. Click Dashboards Icon Dashboards in the sidebar.

  2. Click Create dashboard.

  3. Click the Data tab.

  4. Click Add dataset.

  5. Select one or more tables to use as the data source.

  6. Use the visual interface to define the following:

    • Dimensions: Columns used to group or filter results, such as region, product category, or date.
    • Measures: Aggregated values, such as total revenue or average order value.
    • Joins: Relationships between tables.

    For more details on defining dimensions, measures, and joins, see Create a metric view.

    Add dataset from table

  7. Save the metric view. It is added to your dashboard as a dataset.

Extend a Unity Catalog metric view

You can build on top of an existing Unity Catalog metric view by adding dashboard-specific measures and dimensions. Read-only access to the Unity Catalog metric view is sufficient.

To extend a Unity Catalog metric view:

  1. Open an AI/BI dashboard and click the Data tab.
  2. Click Add dataset.
  3. Select an existing Unity Catalog metric view as the base.
  4. Add measures or dimensions specific to your dashboard.
  5. Save the metric view.

Export to a Unity Catalog metric view

When a local metric view is ready for broader use, you can export it to Unity Catalog to make it a global metric view, accessible by all downstream tools. Exporting makes the metric view available to other dashboards, Genie Spaces, and tools that support Unity Catalog metric views.

To export a local metric view to Unity Catalog:

  1. In the Data tab, click the Kebab menu icon. kebab menu next to the local metric view.
  2. Select Export to UC.
  3. (Optional) Edit the metric view name.
  4. Choose the catalog and schema where you want to store the metric view.
  5. Click Create.

For more information about Unity Catalog metric views, see Unity Catalog metric views.

Limitations

The following limitations apply to local metric views:

  • Local metric views do not support IDENTIFIER or value parameters.
  • Local metric views do not support SQL queries with GRANT statements (e.g. USE CATALOG). See GRANT.
  • You cannot convert an existing SQL dataset to a local metric view.