From 3f9863d54e0ced93fed6dc2f654c7ba9b811dd05 Mon Sep 17 00:00:00 2001 From: Thomas Lento Date: Tue, 14 Nov 2023 12:35:46 -0800 Subject: [PATCH] Update saved query documentation for MetricFlow release With the release of MetricFlow 0.203.0 and dbt-metricflow 0.4.0 we now have support for saved queries. This commit removes the "coming soon" marker and updates the spec to match the final release version. --- website/docs/docs/build/saved-queries.md | 25 ++++++++++-------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/website/docs/docs/build/saved-queries.md b/website/docs/docs/build/saved-queries.md index 39a4b2e52fd..a447fbb1a1a 100644 --- a/website/docs/docs/build/saved-queries.md +++ b/website/docs/docs/build/saved-queries.md @@ -6,10 +6,6 @@ sidebar_label: "Saved queries" tags: [Metrics, Semantic Layer] --- -:::info Saved queries coming soon -Saved queries isn't currently available in MetricFlow but support is coming soon. -::: - Saved queries are a way to save commonly used queries in MetricFlow. You can group metrics, dimensions, and filters that are logically related into a saved query. To define a saved query, refer to the following specification: @@ -18,9 +14,7 @@ To define a saved query, refer to the following specification: | --------- | ----------- | ---- | | `name` | The name of the metric. | Required | | `description` | The description of the metric. | Optional | -| `metrics` | The metrics included in the saved query. | Required | -| `group_bys` | The value displayed in downstream tools. | Required | -| `where` | Filter applied to the query. | Optional | +| `query_params` | The query parameters for the saved query: `metrics`, `group_by`, and `where`. | Required | The following is an example of a saved query: @@ -28,14 +22,15 @@ The following is an example of a saved query: saved_query: name: p0_booking description: Booking-related metrics that are of the highest priority. - metrics: - - bookings - - instant_bookings - group_bys: - - TimeDimension('metric_time', 'day') - - Dimension('listing__capacity_latest') - where: - - "{{ Dimension('listing__capacity_latest') }} > 3" + query_params: + metrics: + - bookings + - instant_bookings + group_bys: + - TimeDimension('metric_time', 'day') + - Dimension('listing__capacity_latest') + where: + - "{{ Dimension('listing__capacity_latest') }} > 3" ``` ### FAQs