Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/docs/reference/project-files/apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Custom APIs allow you to create endpoints that can be called to retrieve or mani

_[string]_ - Refers to the resource type and must be `api` _(required)_

### `openai`
### `openapi`

_[object]_ - OpenAI specification for the API endpoint
_[object]_ - OpenAPI specification for the API endpoint

- **`summary`** - _[string]_ - A brief description of what the API endpoint does

Expand Down
10 changes: 10 additions & 0 deletions docs/docs/reference/project-files/canvas-dashboards.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,16 @@ _[object]_ - Defines [security rules and access control policies](/build/metrics

- **option 2** - _[boolean]_ - Direct boolean value to allow or deny access

### `variables`

_[array of object]_ - Variables that can be used in the canvas

- **`name`** - _[string]_ - Unique identifier for the variable _(required)_

- **`type`** - _[string]_ - Data type of the variable (e.g., string, number, boolean) _(required)_

- **`value`** - _[string, number, boolean, object, array]_ - Default value for the variable. Can be any valid JSON value type

## Common Properties

### `name`
Expand Down
130 changes: 128 additions & 2 deletions docs/docs/reference/project-files/metrics-views.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ _[string]_ - The version of the metrics view schema

### `type`

_[string]_ - Refers to the resource type and must be `metrics_view` _(required)_
_[string]_ - Refers to the resource type and must be `metrics_view`

### `connector`

Expand All @@ -32,9 +32,13 @@ _[string]_ - Refers to the description for the metrics view

_[string]_ - Extra instructions for [AI agents](/explore/mcp). Used to guide natural language question answering and routing.

### `parent`

_[string]_ - Refers to the parent metrics view from which this metrics view is derived. If specified, this will inherit properties from the parent metrics view

### `model`

_[string]_ - Refers to the model powering the dashboard (either model or table is required) _(required)_
_[string]_ - Refers to the model powering the dashboard (either model or table is required)

### `database`

Expand Down Expand Up @@ -184,6 +188,38 @@ _[array of object]_ - Used to define the numeric aggregates of columns from your

- **`treat_nulls_as`** - _[string]_ - used to configure what value to fill in for missing time buckets. This also works generally as COALESCING over non empty time buckets.

### `parent_dimensions`

_[oneOf]_ - Optional field selectors for dimensions to inherit from the parent metrics view.

- **option 1** - _[string]_ - Wildcard(*) selector that includes all available fields in the selection

- **option 2** - _[array of string]_ - Explicit list of fields to include in the selection

- **option 3** - _[object]_ - Advanced matching using regex, DuckDB expression, or exclusion

- **`regex`** - _[string]_ - Select fields using a regular expression

- **`expr`** - _[string]_ - DuckDB SQL expression to select fields based on custom logic

- **`exclude`** - _[object]_ - Select all fields except those listed here

### `parent_measures`

_[oneOf]_ - Optional field selectors for measures to inherit from the parent metrics view.

- **option 1** - _[string]_ - Wildcard(*) selector that includes all available fields in the selection

- **option 2** - _[array of string]_ - Explicit list of fields to include in the selection

- **option 3** - _[object]_ - Advanced matching using regex, DuckDB expression, or exclusion

- **`regex`** - _[string]_ - Select fields using a regular expression

- **`expr`** - _[string]_ - DuckDB SQL expression to select fields based on custom logic

- **`exclude`** - _[object]_ - Select all fields except those listed here

### `annotations`

_[array of object]_ - Used to define annotations that can be displayed on charts
Expand Down Expand Up @@ -260,6 +296,96 @@ _[object]_ - Defines [security rules and access control policies](/build/metrics

- **`sql`** - _[string]_ - SQL expression for row filtering (for row_filter type rules)

### `explore`

_[object]_ - Defines an optional inline explore view for the metrics view. If not specified a default explore will be emitted unless `skip` is set to true.

- **`skip`** - _[boolean]_ - If true, disables the explore view for this metrics view.

- **`name`** - _[string]_ - Name of the explore view.

- **`display_name`** - _[string]_ - Display name for the explore view.

- **`description`** - _[string]_ - Description for the explore view.

- **`banner`** - _[string]_ - Custom banner displayed at the header of the explore view.

- **`theme`** - _[oneOf]_ - Name of the theme to use or define a theme inline. Either theme name or inline theme can be set.

- **option 1** - _[string]_ - Name of an existing theme to apply to the explore view.

- **option 2** - _[object]_ - Inline theme configuration.

- **`colors`** - _[object]_ - Used to override the dashboard colors. Either primary or secondary color must be provided.

- **`primary`** - _[string]_ - Overrides the primary blue color in the dashboard. Can have any hex (without the '#' character), [named colors](https://www.w3.org/TR/css-color-4/#named-colors) or hsl() formats. Note that the hue of the input colors is used for variants but the saturation and lightness is copied over from the [blue color palette](https://tailwindcss.com/docs/customizing-colors).

- **`secondary`** - _[string]_ - Overrides the secondary color in the dashboard. Applies to the loading spinner only as of now. Can have any hex (without the '#' character), [named colors](https://www.w3.org/TR/css-color-4/#named-colors) or hsl() formats.

- **`time_ranges`** - _[array of oneOf]_ - Overrides the list of default time range selections available in the dropdown. It can be string or an object with a 'range' and optional 'comparison_offsets'.

- **option 1** - _[string]_ - a valid [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Durations) duration or one of the [Rill ISO 8601 extensions](https://docs.rilldata.com/reference/rill-iso-extensions#extensions) extensions for the selection

- **option 2** - _[object]_ - Object containing time range and comparison configuration

- **`range`** - _[string]_ - a valid [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Durations) duration or one of the [Rill ISO 8601 extensions](https://docs.rilldata.com/reference/rill-iso-extensions#extensions) extensions for the selection _(required)_

- **`comparison_offsets`** - _[array of oneOf]_ - list of time comparison options for this time range selection (optional). Must be one of the [Rill ISO 8601 extensions](https://docs.rilldata.com/reference/rill-iso-extensions#extensions)

- **option 1** - _[string]_ - Offset string only (range is inferred)

- **option 2** - _[object]_ - Object containing offset and range configuration for time comparison

- **`offset`** - _[string]_ - Time offset for comparison (e.g., 'P1D' for one day ago)

- **`range`** - _[string]_ - Custom time range for comparison period

- **`time_zones`** - _[array of string]_ - List of time zones to pin to the top of the time zone selector. Should be a list of IANA time zone identifiers.

- **`lock_time_zone`** - _[boolean]_ - When true, the explore view will be locked to the first time zone provided in the time_zones list. If no time_zones are provided, it will be locked to UTC.

- **`allow_custom_time_range`** - _[boolean]_ - Defaults to true. When set to false, hides the ability to set a custom time range for the user.

- **`defaults`** - _[object]_ - Preset UI state to show by default.

- **`dimensions`** - _[oneOf]_ - Default dimensions to load on viewing the explore view.

- **option 1** - _[string]_ - Wildcard(*) selector that includes all available fields in the selection

- **option 2** - _[array of string]_ - Explicit list of fields to include in the selection

- **option 3** - _[object]_ - Advanced matching using regex, DuckDB expression, or exclusion

- **`regex`** - _[string]_ - Select fields using a regular expression

- **`expr`** - _[string]_ - DuckDB SQL expression to select fields based on custom logic

- **`exclude`** - _[object]_ - Select all fields except those listed here

- **`measures`** - _[oneOf]_ - Default measures to load on viewing the explore view.

- **option 1** - _[string]_ - Wildcard(*) selector that includes all available fields in the selection

- **option 2** - _[array of string]_ - Explicit list of fields to include in the selection

- **option 3** - _[object]_ - Advanced matching using regex, DuckDB expression, or exclusion

- **`regex`** - _[string]_ - Select fields using a regular expression

- **`expr`** - _[string]_ - DuckDB SQL expression to select fields based on custom logic

- **`exclude`** - _[object]_ - Select all fields except those listed here

- **`time_range`** - _[string]_ - Default time range to display when the explore view loads.

- **`comparison_mode`** - _[string]_ - Default comparison mode for metrics (none, time, or dimension).

- **`comparison_dimension`** - _[string]_ - Default dimension to use for comparison when comparison_mode is 'dimension'.

- **`embeds`** - _[object]_ - Configuration options for embedded explore views.

- **`hide_pivot`** - _[boolean]_ - When true, hides the pivot table view in embedded mode.

## Common Properties

### `name`
Expand Down
99 changes: 92 additions & 7 deletions runtime/parser/schema/project.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1784,6 +1784,9 @@ definitions:
ai_instructions:
type: string
description: Extra instructions for [AI agents](/explore/mcp). Used to guide natural language question answering and routing.
parent:
type: string
description: Refers to the parent metrics view from which this metrics view is derived. If specified, this will inherit properties from the parent metrics view
model:
type: string
description: Refers to the model powering the dashboard (either model or table is required)
Expand Down Expand Up @@ -1943,6 +1946,12 @@ definitions:
- display_name
- expression

parent_dimensions:
description: Optional field selectors for dimensions to inherit from the parent metrics view.
$ref: '#/definitions/field_selector_properties'
parent_measures:
description: Optional field selectors for measures to inherit from the parent metrics view.
$ref: '#/definitions/field_selector_properties'
annotations:
type: array
description: Used to define annotations that can be displayed on charts
Expand Down Expand Up @@ -2012,10 +2021,12 @@ definitions:
security:
$ref: '#/definitions/security_policy_properties'
description: Defines a security policy for the dashboard
required:
- type
- model

explore:
$ref: '#/definitions/explore_properties'
description: Defines an optional inline explore view for the metrics view. If not specified a default explore will be emitted unless `skip` is set to true.
required:
- type

- $ref: '#/definitions/common_properties'

# Canvas Dashboards
Expand Down Expand Up @@ -2239,6 +2250,11 @@ definitions:
security:
description: Security rules to apply for access to the canvas dashboard
$ref: '#/definitions/dashboard_security_policy_properties'
variables:
type: array
description: Variables that can be used in the canvas
items:
$ref: '#/definitions/component_variable_properties'
required:
- type
- display_name
Expand Down Expand Up @@ -2548,9 +2564,9 @@ definitions:
type: string
const: api
description: Refers to the resource type and must be `api`
openai:
openapi:
type: object
description: OpenAI specification for the API endpoint
description: OpenAPI specification for the API endpoint
properties:
summary:
type: string
Expand Down Expand Up @@ -3358,6 +3374,75 @@ definitions:
- expr
- required:
- exclude

explore_properties:
type: object
properties:
skip:
type: boolean
description: If true, disables the explore view for this metrics view.
name:
type: string
description: Name of the explore view.
display_name:
type: string
description: Display name for the explore view.
description:
type: string
description: Description for the explore view.
banner:
type: string
description: Custom banner displayed at the header of the explore view.
theme:
oneOf:
- type: string
description: Name of an existing theme to apply to the explore view.
- $ref: '#/definitions/theme_properties'
description: Inline theme configuration.
description: Name of the theme to use or define a theme inline. Either theme name or inline theme can be set.
time_ranges:
type: array
description: Overrides the list of default time range selections available in the dropdown. It can be string or an object with a 'range' and optional 'comparison_offsets'.
items:
$ref: '#/definitions/explore_time_range_properties'
time_zones:
type: array
description: List of time zones to pin to the top of the time zone selector. Should be a list of IANA time zone identifiers.
items:
type: string
lock_time_zone:
type: boolean
description: When true, the explore view will be locked to the first time zone provided in the time_zones list. If no time_zones are provided, it will be locked to UTC.
allow_custom_time_range:
type: boolean
description: Defaults to true. When set to false, hides the ability to set a custom time range for the user.
defaults:
type: object
description: Preset UI state to show by default.
properties:
dimensions:
$ref: '#/definitions/field_selector_properties'
description: Default dimensions to load on viewing the explore view.
measures:
$ref: '#/definitions/field_selector_properties'
description: Default measures to load on viewing the explore view.
time_range:
type: string
description: Default time range to display when the explore view loads.
comparison_mode:
type: string
description: Default comparison mode for metrics (none, time, or dimension).
comparison_dimension:
type: string
description: Default dimension to use for comparison when comparison_mode is 'dimension'.
additionalProperties: false
embeds:
type: object
description: Configuration options for embedded explore views.
properties:
hide_pivot:
type: boolean
description: When true, hides the pivot table view in embedded mode.
additionalProperties: false
additionalProperties: false


Loading