Customizing views
Encode your data's representation in views.
Customizing views in Count Metrics
Views provide a structured way to organize and manage data, but they are also highly customizable. Within the Catalog Builder, the Schema on the right-hand side offers a range of options to edit and refine your View YAML. These customizations allow you to improve usability, enhance data clarity, and provide stakeholders with flexible analysis options—all without writing additional SQL.
Schema
The schema displays a list of available customization options you can use in the view YAML file.
Key customization options
Field labels & groups
You can customize the label for your fields to determine how they appear in the UI. By default, the label is set to the field name, but you can update it for improved readability, making it clearer and more user-friendly. Optionally add a group label to place the field within an expandable group of fields.
fields:
- name: order_total
label: Total Order Value
group: Order metrics
Field descriptions
Adding descriptions to fields helps stakeholders understand what each field represents. These descriptions appear when users hover over a field in the UI, offering helpful context that ensures that even non-technical users can easily interpret the data.
fields:
- name: customer_id
description: A unique identifier assigned to each customer.
Timeframes: Flexible date breakouts
For date fields, you can provide multiple timeframe options directly within the View YAML. Instead of requiring stakeholders to manipulate dates manually, you can pre-define useful breakouts like year, month, or day.
fields:
- name: order_date
type: date
timeframes: [year_trunc, quarter_trunc, month_trunc, week_trunc, day_trunc]
Aggregates: Pre-defined calculations
Instead of requiring users to write manual calculations every time, you can define a set of aggregations directly within your View YAML. This allows stakeholders to choose from multiple summary options—like sum, average, or count—with just a click.
fields:
- name: number_of_employees
type: integer
aggregates: [sum, min, max, avg, count]
Expressions: Creating custom calculated fields
In addition to predefined fields, you can create custom calculated fields using the expression option. This allows you to define new fields based on existing ones, without modifying the original dataset.
fields:
- name: events_per_user
expression: count(distinct event_id) / count (distinct user_id)
type: number
Last updated