- Overview
- Platform setup and administration
- Platform setup and administration
- Platform architecture
- Data Bridge onboarding overview
- Connecting a Peak-managed data lake
- Connecting a customer-managed data lake
- Creating an AWS IAM role for Data Bridge
- Connecting a Snowflake data warehouse
- Connecting a Redshift data warehouse (public connectivity)
- Connecting a Redshift data warehouse (private connectivity)
- Reauthorizing a Snowflake OAuth connection
- Using Snowflake with Peak
- SQL Explorer overview
- Roles and permissions
- User management
- Autopilot for Retail & Supply Chain
- About Autopilot for Retail & Supply Chain
- Asking questions with Autopilot
- Creating dashboards with Autopilot
- Working with dashboard templates
- Using the Autopilot plugin for Claude Code
- Using Autopilot in messaging apps
- Autopilot settings
- Autopilot permissions
- Creating metrics with Metric Builder
- Managing Autopilot context
- Adding documents to the knowledge base
- Managing Autopilot actions
- Managing Autopilot projects
- Autopilot security and privacy
- Inventory management solution
- Commercial pricing solution
- Merchandising solution
Creating metrics with Metric Builder
Create metrics with Metric Builder by describing them to the assistant, then validate them against the data warehouse and publish them to a namespace.
Metric Builder is where you define the metrics that Autopilot for Retail & Supply Chain and Canvas dashboards use. You describe a metric to the Metric Builder assistant, review the definition it writes, validate it against the data warehouse, and publish it.
Metrics, cubes, and namespaces
- Metric: a business measure, such as net sales or units sold, or an attribute to break it down by, such as region or product.
- Cube: the metrics built on one table of the data warehouse.
- Namespace: a group of published cubes. In Autopilot settings, a namespace is called a metrics group.
Every tenant has a default namespace, which Autopilot uses unless a user selects another metrics group. A separate namespace keeps a set of metrics apart, for example while you build and test them.
Prerequisites
Before creating metrics, ensure you have the following:
- The Tools > Metrics Write permission.
- To publish metrics, the tenant admin or tenant manager role. For details, see Autopilot permissions.
- The tables that the metrics use, available in the data warehouse.
Creating metrics
Follow these steps to create metrics:
- In the platform, go to Tools > Metrics.
- In the namespace selector, select a namespace, or select New namespace.
- Optional: to build metrics from specific tables, select + in the chat and select the schema and the tables.
- In the chat, describe the metric, for example "Weekly units sold by store, excluding returns".
- Review the definition on the Changes tab.
- Optional: to adjust the definition, ask the assistant, or edit the file on the Files tab.
Changes stay in a draft until you publish. Revert all, on the Changes tab, discards the draft.
Autopilot selects metrics by their names and descriptions. Give each metric a clear business name and a description that includes its unit, and keep one definition per metric.
Validating metrics
Follow these steps to validate the draft against the data warehouse:
- Select Validate.
- On the Validation tab, check the result for each cube.
In the image: Validate (1), the Validation tab with the result for each cube (2), and Publish (3).
Publishing metrics
Follow these steps to publish the validated metrics:
- Select Publish.
- For a new namespace, enter a name.
- Select Publish in the dialog.
The published metrics are available to Autopilot and to the dashboards that use the namespace. To test them, ask questions about the new metrics in the Metric Builder chat.
Publishing rules
- Publishing to an existing namespace replaces its content with the draft.
- Every table and column is checked against the data warehouse before publishing. If a check fails, nothing is published, and the Validation tab names the table or column that wasn't found.
- If another user publishes the same namespace while you work, Metric Builder shows "This namespace was updated after you started". Select Load latest, then ask the assistant to apply your change again.
- A namespace name can contain letters, numbers, underscores, hyphens, and dots, up to 255 characters, and must be unique in the tenant. The name
peak__dq_dashboardis reserved for the Data Quality dashboard.
Deleting a namespace
Delete namespace, in the More actions menu, deletes the namespace with all its metrics.
Autopilot answers and dashboards that use a deleted namespace stop working. The deletion can't be undone.