Skip to content

Commit

Permalink
Docs/v50 fixes (#5934)
Browse files Browse the repository at this point in the history
* small nit fixes to docs

* Reworking Manage Section and small fixes

* more nit changes, start rewrite of metric-view.md

* fixing metrics-view to metrics view

* fixing UI to Rill Cloud where appropriate

* fixed linkes

* small fixes

* metrics view + small changes

* small fixes and media addition to manage

* Update _category_.yml

* updating OLAP img
  • Loading branch information
royendo authored Oct 23, 2024
1 parent 107f195 commit 245d6b0
Show file tree
Hide file tree
Showing 31 changed files with 361 additions and 304 deletions.
2 changes: 2 additions & 0 deletions docs/docs/build/connect/connect.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ sidebar_position: 00

<!-- WARNING: There are links to this page in source code. If you move it, find and replace the links and consider adding a redirect in docusaurus.config.js. -->

<img src = '/img/tutorials/102/Adding-Data.gif' class='rounded-gif' />
<br />

Rill supports a multitude of connectors to ingest data from various sources: local files, S3 or GCS buckets, download using HTTP(S), databases, data warehouses, and the list goes on. Rill can ingest `.csv`, `.tsv`, `.json`,and `.parquet` files, which may be compressed (`.gz`). This can be done either through the UI directly, when working with Rill Developer, or by pushing the logic into the [source YAML](../../reference/project-files/sources.md) definition directly (see _Using Code_ sections below).

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/build/dashboards/dashboards.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_label: Create Dashboards
sidebar_position: 00
---

In Rill, dashboards are one of many components that access the metrics layer. Currently, it is possible to create an explore dashboard but more features are on the way!
In Rill, dashboards are one of many components that access the metrics layer. Currently, it is only possible to create an explore dashboard but more features are on the way!

![img](/img/build/dashboard/explore-dashboard.png)

Expand All @@ -27,7 +27,7 @@ measures:
:::tip
Starting in version 0.50, metrics view has been separated from dashboard. This allows for a cleaner, more accessible metrics layer and the ability to build various dashboards and components on top of a single metrics layer. For more information on why we decided to do this, please refer to the following: [Why separate the dashboard and metrics layer](/concepts/metrics-layer)
For migration steps, see [Migrations](/manage/migration#v049---v050).
For migration steps, see [Migrations](/latest-changes/v50-dashboard-changes#how-to-migrate-your-current-dashboards).
:::
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/build/metrics-view/customize.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sidebar_position: 30

## Common Customizations

You will find below some common customizations and metrics-view configurations that are available for end users.
You will find below some common customizations and metrics view configurations that are available for end users.

:::info Metric View properties

Expand Down Expand Up @@ -39,7 +39,7 @@ Defining security policies for your data is crucial for security. For more infor
version: 1 #defines version
type: metrics_view # metrics_view

title: The title of your metrics_view
title: The title of your metrics view
display_name: The display_name
description: A description
model: refernce the model or table,
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/build/metrics-view/expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Rill's modeling layer provides open-ended SQL compatibility for complex SQL quer

## Measure Expressions

Measure expressions can take any SQL numeric function, a set of aggregates and apply filters to create derived metrics. Reminder on basic expressions are available in the [create metrics-view definition](metrics-view.md#measures).
Measure expressions can take any SQL numeric function, a set of aggregates and apply filters to create derived metrics. Reminder on basic expressions are available in the [create metrics view definition](metrics-view.md#measures).

### Metric Formatting

Expand Down
6 changes: 3 additions & 3 deletions docs/docs/build/metrics-view/metrics-view.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Create Metrics Views
description: Create metrics-view using source data and models with time, dimensions, and measures
description: Create metrics view using source data and models with time, dimensions, and measures
sidebar_label: Create Metrics Views
sidebar_position: 00
---
Expand All @@ -18,7 +18,7 @@ In Rill, your metrics view is defined by _metric definitions_. Metric definition
:::tip
Starting in version 0.50, metrics view has been separated from dashboard. This allows for a cleaner, more accessible metrics layer and the ability to build various dashboards and components on top of a single metrics layer. For more information on why we decided to do this, please refer to the following: [Why separate the dashboard and metrics layer](/concepts/metrics-layer)

For migration steps, see [Migrations](/manage/migration#v049---v050).
For migration steps, see [Migrations](/latest-changes/v50-dashboard-changes#how-to-migrate-your-current-dashboards).
:::

## Creating valid metrics
Expand Down Expand Up @@ -71,7 +71,7 @@ In your Rill project directory, after the `metrics-view.yaml` file is created in
version: 1
type: metrics_view

table: example_table # Choose a table to underpin your metrics
model: example_model # Choose a table to underpin your metrics
timeseries: timestamp_column # Choose a timestamp column (if any) from your table

dimensions:
Expand Down
8 changes: 7 additions & 1 deletion docs/docs/build/models/models.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ sidebar_label: Create Models
sidebar_position: 00
---

<img src = '/img/tutorials/102/Add-model.gif' class='rounded-gif' />
<br />


[Data models](/reference/project-files/models.md) in Rill are composed of SQL `SELECT` statements that operate on source data. They allow you to join, transform, and clean data.

## SQL transformations

Data transformations in Rill Developer are powered by DuckDB and their dialect of SQL (DuckDB SQL). Please visit [DuckDB SQL documentation](https://duckdb.org/docs/sql/introduction) to learn about how to write your queries.
By default, data transformations in Rill Developer are powered by DuckDB and their dialect of SQL (DuckDB SQL). Please visit [DuckDB SQL documentation](https://duckdb.org/docs/sql/introduction) to learn about how to write your queries.

It is possible to change the default [OLAP engine](https://docs.rilldata.com/build/olap/) for [the entire project](https://docs.rilldata.com/reference/project-files/rill-yaml#configuring-the-default-olap-engine) or [a specific metrics view](https://docs.rilldata.com/reference/project-files/metrics-view). You will need to define the connector credentials within your Rill project, or via the environmental variables.

For additional tips on commonly used expressions (either in models or dashboard definitions) visit our [common expressions page](../metrics-view/expressions.md).

Expand Down
11 changes: 8 additions & 3 deletions docs/docs/build/olap/olap.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ Rill is continually evaluating additional OLAP engines that can be added. For a

DuckDB is unique in that it can act as both a [source](../../reference/connectors/motherduck.md) and [OLAP engine](../../reference/olap-engines/duckdb.md) for Rill. If you wish to connect to existing tables in DuckDB though, you can simply use the [DuckDB connector](../../reference/connectors/motherduck.md#connecting-to-external-duckdb-as-a-source) to read a specific table or view from an accessible DuckDB database file and ingest the data into Rill.

![ch](/img/build/connect/duckdb.png)


:::warning

Rill will use DuckDB by default as an embedded OLAP engine but it is **not** currently possible to "bring your own DuckDB database" to be used as an alternative OLAP Engine. The internal DuckDB that Rill uses is hardcoded and not configurable (necessary for Rill Cloud consistency).
Expand All @@ -52,9 +55,11 @@ When Druid has been configured as the [default OLAP engine](../../reference/proj

When ClickHouse has been configured as the [default OLAP engine](../../reference/project-files/rill-yaml.md#configuring-the-default-olap-engine) for your project, any existing external tables that Rill can read and query should be shown through the Rill Developer UI. You can then create dashboards using these external ClickHouse tables.

<div className="center-content">
![External ClickHouse tables](/img/build/connect/external-tables/external-clickhouse-table.png)
</div>
![ch](/img/build/connect/clickhouse.png)

:::note No Source Folder in ClickHouse
There is no source folder in a ClickHouse based project as all of the tables exist on your ClickHouse Database and is read into Rill at start up. If you try to import data into a ClickHouse based project, you will likely result in errors stating that importing from XXX to ClickHouse is not supported.
:::

## Pinot

Expand Down
34 changes: 11 additions & 23 deletions docs/docs/concepts/metrics-layer.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,34 @@
---
title: "What is a Metrics View?"
title: "What is a Metrics Layer?"
sidebar_label: "What is a Metrics View?"
sidebar_position: 11
hide_table_of_contents: true
---

What is a metrics layer, and why did we decide to split the dashboard into two individual components?


## What is a Metrics Layer?

A metrics layer is a `centralized framework` used to define and organize **key metrics** for your organization. Having a centralized layer allows an organization to easily manage and re-use calculations across various reports, dashboard, and data tools. As Rill continues to grow, we decided to separate metrics layer from the dashboard configuration.


### Historically, in Rill...
<img src = '/img/concepts/metrics-view/old-dashboard.png' class='rounded-gif' />
<br />

Historically in Rill, the metrics layer and dashboard configuration were a single file. As seen above, the metrics would be defined **inside** a dashboard YAML file along with the dashboard components and dashboard customizations. However, as we continue to create more features, we found that this was not the best approach. In order to create a metrics layer in Rill as a first class resource and not a consequence of dashboards, we found it necessary to split the two resources into their own files. Thus, the metrics-view was born.

:::tip
Starting from version 0.50, the operation of creating a dashboard via AI will create a metrics-view and dashboard separately in their own respective folders and navigate you to a preview of your dashboard. If you find that some of the metrics need to be modified, you will need to navigate to your [metrics/model_name_metrics.yaml](/build/metrics-view/) file.
Starting from version 0.50, the operation of creating a dashboard via AI will create a metrics view and dashboard separately in their own respective folders and navigate you to a preview of your dashboard. If you find that some of the metrics need to be modified, you will need to navigate to your [metrics/model_name_metrics.yaml](/build/metrics-view/) file.


Assuming that you have the ' * ', select all, in your dashboard configurations, any changes will automatically be changed on your [explore dashboard](/build/dashboards/).
:::

## Splitting the Dashboard into two components, Metrics-view and Dashboard Configuration
Splitting the metrics view into its own component allows us more freedom to continue building Rill and adding new additional features. Instead of querying a dashboard for data, we would be querying the metrics-layer. The dashboard will directly query the metrics-view along with many new components that are currently being developed.

### New Metrics View as an independent object in Rill
## Introducing Metrics View
Within Rill, we refer to Metrics layers as a metrics view. It's a single view or file that contains all of your measures and dimensions that will be used to display the data in various ways. The metrics view also contains some configurations settings that are required to ensure that the data being displayed is as accurate as you need.

![img](/img/concepts/metrics-view/metrics-view-components.png)

### (Explore) Dashboard
![img](/img/tutorials/102/new-viz-editor.png)

With the split of metrics view, dashboard configurations experienced an overhaul. Instead of defining measure and dimensions, you will now reference the object into your dashboard. What this allows is creating customized dashboards for specific viewers and reusability of a single metrics-view in multiple dashboards!
:::tip
It is possible to develop the metrics layer in a traditional BI-as-code manner as well as via the UI. To switch between the two, select the toggle in the top right corner.
:::

![img](/img/concepts/metrics-view/explore-dashboard.png)
## Interfacing with a Metrics view

For more information on what is changed, please review the [migrations](/manage/migration) and the [reference page](/reference/project-files/explore-dashboards).
A metrics view on its own does not have any visualization capabilities. Instead, the metrics view is the building block for all of the visualization and components within Rill. Please see below for the currently available and soon to be released features of Rill!

## More to come!
![img](/img/concepts/metrics-view/metrics-view-components.png)

New features are being developed as we speak! If you're curious, feel free to [contact us](/contact)!
2 changes: 1 addition & 1 deletion docs/docs/deploy/deploy-dashboard/deploy-dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ Likewise, if using the UI by selecting the `Update` button, Rill will detect the
:::tip Interested in using Gitlab?
Check out our documentation on deploying a [Rill project using Gitlab](deploy-from-ci.md)!
Check out our documentation on deploying a [Rill project using Gitlab](deploy-from-cli.md)!
:::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Follow these steps to setup continuous deployment from Gitlab to Rill Cloud:

1. Create a new Gitlab repository and push your Rill project to it.

2. On your local, [authenticate with Rill Cloud](/manage/user-management.md#install-and-authenticate-the-rill-cli) and create an organization (replace `my-org-name` with your desired name):
2. On your local, [authenticate with Rill Cloud](/manage/user-management#logging-into-rill-cloud) and create an organization (replace `my-org-name` with your desired name):
```bash
rill login
rill org create my-org-name
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/explore/dashboard-101.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The main screen of any Rill dashboard is called the _Explore_ page. As seen abov

- _**Explore or Pivot:**_ You can switch the view from _explore_ to [_pivot_](https://docs.rilldata.com/explore/filters/pivot) by selecting either from the UI (see `pink` box)

- _**Alerts, Bookmarks and Sharing:**_ You can create an [alert](./alerts/alerts.md) by selecting the bell, customizing the default view of the dashboard (see `purple` box) to a predefined set of metrics, dimensions, and filters by selecting the [bookmark](bookmarks.md), or share the dashboard ([internally](/manage/user-management#option-1---admin-invites-user) or [externally](./public-url.md)) by clicking the `Share` button.
- _**Alerts, Bookmarks and Sharing:**_ You can create an [alert](./alerts/alerts.md) by selecting the bell, customizing the default view of the dashboard (see `purple` box) to a predefined set of metrics, dimensions, and filters by selecting the [bookmark](bookmarks.md), or share the dashboard ([internally](/manage/user-management#administrator-shares-from-rill-cloud) or [externally](./public-url.md)) by clicking the `Share` button.


### Metrics Panel
Expand Down
3 changes: 0 additions & 3 deletions docs/docs/explore/public-url.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ You can now manage public URLs via the UI. You will find a new "settings" tab in
![img](/img/explore/publicurl/public-url-settings.png)

### via the CLI
:::tip
Starting from v.0.48, `public-url` has been rebranded to `public-url`.
:::
```
rill public-url
Manage public URLs
Expand Down
4 changes: 4 additions & 0 deletions docs/docs/latest-changes/_category_.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
position: 90
label: Changes
collapsible: false
collapsed: false
146 changes: 146 additions & 0 deletions docs/docs/latest-changes/v50-dashboard-changes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
---
title: "Dashboard split into two components"
description: For documenting required migrations
sidebar_label: "Changes to Dashboards"
sidebar_position: 60
---
As we continue to develope more features within Rill, it became clear that we needed to separate the dashboard into two components.
1. Metrics view
2. Dashboard configuration

### Historically, in Rill...
<img src = '/img/concepts/metrics-view/old-dashboard.png' class='rounded-gif' />
<br />

Historically in Rill, the metrics layer and dashboard configuration were a single file. As seen above, the metrics would be defined **inside** a dashboard YAML file along with the dashboard components and dashboard customizations. We found that this was not the best approach as we continued developement. In order to create a metrics layer in Rill as a first class resource and not a consequence of dashboards, we found it necessary to split the two resources into their own files. Thus, the metrics view was born.

## Splitting the Dashboard into two components, Metrics view and Dashboard Configuration
Splitting the metrics view into its own component allows us more freedom to continue building Rill and adding new additional features. Instead of querying a dashboard for data, we would be querying the metrics-layer. The dashboard will directly query the metrics view along with many new components that are currently being developed.

### New Metrics View as an independent object in Rill

![img](/img/concepts/metrics-view/metrics-view-components.png)

### (Explore) Dashboard

With the split of metrics view, dashboard configurations experienced an overhaul. Instead of defining measure and dimensions, you will now reference the object into your dashboard. What this allows is creating customized dashboards for specific viewers and reusability of a single metrics view in multiple dashboards!

![img](/img/concepts/metrics-view/explore-dashboard.png)

## How to migrate your current Dashboards

### version 0.49 -> version 0.50

Due to the [separation of dashboards to metrics layer and dashboards](/concepts/metrics-layer), you will need to review your current dashboards and make the following changes (note: Legacy dashboards will continue to function.):

**[Sample Legacy Dashboard Contents](https://docs.rilldata.com/reference/project-files/explore-dashboards):**

```yaml
title: #defined on metrics view and dashboard
model: #defined on metrics view
type: #defined on both, explore or metrics view
timeseries: #defined on metrics view

smallest_time_grain: #defined in metrics view,

default_dimensions: #separate default
default_measures: #values defined in
default_comparisons: #dashboard config
...



measures: #defined in metrics view,
...

dimensions: #defined in metrics view,
...

security: #defined on both metrics view and dashboard but different capabilities
...

theme: #defined in dashboard

available_time_zones: #defined in dashboard as time_zones:
available_time_ranges: #defined in dashboard as time_ranges:

first_day_of_week: #defined in metrics view,
first_month_of_year: #defined in metrics view,

```
---
**[Metrics View YAML](/reference/project-files/metrics-view):**
Please check the reference for the required parameters for a metrics view.
```yaml
version: 1 #defines version
type: metrics_view # metrics_view

title: The title of your metrics_view
display_name: The display_name
description: A description
model / table: reference to the model or table,
database / database_schema: #if using a different OLAP engine, refers to database and schema (usually not required)

timeseries: your timeseries column

smallest_time_grain: #defines the smallest time grain

first_day_of_week: #defines first day of week
first_month_of_year: #defines first month of year

dimensions: #your dimensions, can be copied from dashboard.yaml
- name:
label:
column/expression:
property:
description:
unnest:
uri:

measures: #your measures, can be copied from dashboard.yaml
- name:
label:
type:
expressions:
window:
per:
requires:
description:
format_preset / format_d3:
valid_percent_of_total:

security: #your security policies can be copied from dashboard.yaml
```
**[Explore dashboard YAML](/reference/project-files/explore-dashboards):**
Please check the reference for the required parameters for an explore dashboard.
```yaml
type: explore

title: Title of your explore dashboard
description: a description
metrics_view: <your-metric-view-file-name>

dimensions: '*' #can use regex
measures: '*' #can use regex

theme: #your default theme

time_ranges: #was available_time_ranges
time_zones: #was available_time_zones

defaults: #define all the defaults within here
dimensions:
measures:
time_range:
comparison_mode:
comparison_dimension:

security:
access: #only access can be set on dashboard level, see metric view for detailed access policy
```
For any questions, please [contact the team](https://docs.rilldata.com/contact) via Slack, email, Discord or the in-app chat!
Loading

0 comments on commit 245d6b0

Please sign in to comment.