diff --git a/docs/docs/tutorials/rill_basics/4-metrics-view.md b/docs/docs/tutorials/rill_basics/4-metrics-view.md index 439fd267682..958bf9e1665 100644 --- a/docs/docs/tutorials/rill_basics/4-metrics-view.md +++ b/docs/docs/tutorials/rill_basics/4-metrics-view.md @@ -134,3 +134,84 @@ measures: Measure are the numeric aggreagtes of columns from your data model. These function will use DuckDB SQL aggregation functions and expressions. Similar to dimensions, you will need to create an expression based on the column of your underlying model or table. Our first measure will be: `SUM(added_lines)`. + +## Adding more Functionality + +Let's add further dimensions and measure to the metrics layer and see the changes to the explore dashboard. + +### Dimensions + +From our dataset, we can add more dimensions to allow more filtering and exploration of the measures we will create. + + Add the following dimensions, with title and description. + - author_name + - author_timezone + - filename + +### Measures + + We can definitely create better aggregations for some more meaningful data based on these commits. + - sum(added_lines) + - sum(deleted_lines) + + +You may need to reference the metrics view YAML reference guide to figure out the above. Your final output should look something like this! + +![finished](/img/tutorials/103/Completed-100-dashboard.png) + + +
+ Working Metrics View YAML + ```yaml +# Metrics View YAML +# Reference documentation: https://docs.rilldata.com/reference/project-files/metrics_views + +version: 1 +type: metrics_view + +table: commits___model + +timeseries: author_date # Select an actual timestamp column (if any) from your table + +dimensions: + - column: author_name + name: author_name + label: The Author's Name + description: The name of the author of the commit + + - column: author_timezone + label: "The Author's TZ" + description: "The Author's Timezone" + + - column: filename + label: "The filename" + description: "The name of the modified filename" + +measures: + - expression: SUM(added_lines) + name: added_lines + label: Sum of Added lines + format_preset: humanize + description: The aggregate sum of added_lines column. + valid_percent_of_total: true + + - expression: "SUM(deleted_lines)" + label: "Sum of deleted lines" + description: "The aggregate sum of deleted_lines column." + +``` + +
+ + +### Completed visual metrics editor + +If you decide to build out the metrics view via the UI, it should look something like below! + +![img](/img/tutorials/103/visual-metric-editor.png) + + +import DocsRating from '@site/src/components/DocsRating'; + +--- + diff --git a/docs/docs/tutorials/rill_basics/5-dashboard.md b/docs/docs/tutorials/rill_basics/5-dashboard.md index d1296e7e4fa..b6f4808baa8 100644 --- a/docs/docs/tutorials/rill_basics/5-dashboard.md +++ b/docs/docs/tutorials/rill_basics/5-dashboard.md @@ -7,99 +7,47 @@ tags: - OLAP:DuckDB --- -## Create the Explore dashboard -At this point our metrics view is ready! Let's rename the metrics to `commits___model_metrics.yaml` and select `Create Explore`. +At this point our metrics view is ready! Let's select `Create Explore Dashboard`. This will automatically populate the explore dashboard to select all the of created metrics and dimension in your metrics view. We can make changes to the view via the YAML or visual dashboard editor. +![img](/img/tutorials/103/Completed-100-dashboard.png) -This will create an explore-dashboards folder with a very simple YAML file. Let's go ahead a select preview to see what it looks like. You should see something similar to the below. +## Making Changes +### Visual Explore Dashboard -![simple](/img/tutorials/103/simple-dashboard.png) +![img](/img/tutorials/103/visual-dashboard-tutorial.png) +On the right panel, you are able to select measures, dimensions, time ranges, and various other components that control the view of your dashboard. In the main area, you will see a preview of what your dashboard will look like. You can also select the code view to make any needed changes and/or set more advanced settings as found in our [explore dashboard YAML reference.](https://docs.rilldata.com/reference/project-files/explore-dashboards) -We can definitely do better than that! +### YAML +By default, the page will contain the basics parameters as seen below. You can add more advanced settings as you require for you use case. +```YAML +# Explore YAML +# Reference documentation: https://docs.rilldata.com/reference/project-files/explore-dashboards ---- -For a quick summary on the different components that we modified, and its respective parts in the dashboard UI. - - -
- - -## Adding more Functionality - -Let's add further dimensions and measure to the metrics layer and see the changes to the explore dashboard. - -### Dimensions - -From our dataset, we can add more dimensions to allow more filtering and exploration of the measures we will create. - - Add the following dimensions, with title and description. - - author_name - - author_timezone - - filename - -### Measures - - We can definitely create better aggregations for some more meaningful data based on these commits. - - sum(added_lines) - - sum(deleted_lines) +type: explore +title: "commits___model_metrics dashboard" +metrics_view: commits___model_metrics -You may need to reference the metrics view YAML reference guide to figure out the above. Your final output should look something like this! - -![finished](/img/tutorials/103/Completed-100-dashboard.png) - - -
- Working Metrics View YAML - ```yaml -# Metrics View YAML -# Reference documentation: https://docs.rilldata.com/reference/project-files/metrics_views - -version: 1 -type: metrics_view - -table: commits___model - -timeseries: author_date # Select an actual timestamp column (if any) from your table - -dimensions: - - column: author_name - name: author_name - label: The Author's Name - description: The name of the author of the commit +dimensions: '*' +measures: '*' +``` - - column: author_timezone - label: "The Author's TZ" - description: "The Author's Timezone" - - column: filename - label: "The filename" - description: "The name of the modified filename" -measures: - - expression: SUM(added_lines) - name: added_lines - label: Sum of Added lines - format_preset: humanize - description: The aggregate sum of added_lines column. - valid_percent_of_total: true +### Explore Dasboard Components - - expression: "SUM(deleted_lines)" - label: "Sum of deleted lines" - description: "The aggregate sum of deleted_lines column." +For a quick summary on the different components of an explore dashboard, and its respective parts in the dashboard UI. -``` + +
-
+--- -### Completed visual metrics editor -If you decide to build out the metrics view via the UI, it should look something like below! -![img](/img/tutorials/103/visual-metric-editor.png) diff --git a/docs/static/img/tutorials/103/visual-dashboard-tutorial.png b/docs/static/img/tutorials/103/visual-dashboard-tutorial.png new file mode 100644 index 00000000000..e9a80dd7b9f Binary files /dev/null and b/docs/static/img/tutorials/103/visual-dashboard-tutorial.png differ