From 8176b6632df799725797882e45a01652e0e5a050 Mon Sep 17 00:00:00 2001 From: rpourzand Date: Fri, 18 Aug 2023 15:56:57 -0700 Subject: [PATCH 01/14] Update sl-jdbc.md - update to filter list for WHERE - update to examples with where - updates for using Dimension() AND TimeDimension() in where clause --- website/docs/docs/dbt-cloud-apis/sl-jdbc.md | 24 +++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/website/docs/docs/dbt-cloud-apis/sl-jdbc.md b/website/docs/docs/dbt-cloud-apis/sl-jdbc.md index 79864e200a5..e4d1d6ebbaf 100644 --- a/website/docs/docs/dbt-cloud-apis/sl-jdbc.md +++ b/website/docs/docs/dbt-cloud-apis/sl-jdbc.md @@ -138,7 +138,7 @@ To query metric values, here are the following parameters that are available: | `metrics` | The metric name as defined in your dbt metric configuration | `metrics=['revenue']` | Required | | `group_by` | Dimension names or entities to group by. We require a reference to the entity of the dimension (other than for the primary time dimension), which is pre-appended to the front of the dimension name with a double underscore. | `group_by=['user__country', 'metric_time']` | Optional | | `grain` | A parameter specific to any time dimension and changes the grain of the data from the default for the metric. | `group_by=[Dimension('metric_time')`
`grain('week\|day\|month\|quarter\|year')]` | Optional | -| `where` | A where clause that allows you to filter on dimensions and entities using parameters - comes with `TimeDimension`, `Dimension`, and `Entity` objects. Granularity is required with `TimeDimension` | `"{{ where=Dimension('customer__country') }} = 'US')"` | Optional | +| `where` | A where clause that allows you to filter on dimensions and entities using parameters. This takes a filter list OR string. Inputs come with `Dimension`, and `Entity` objects. Granularity is required if the `Dimension` is a time dimension | `"{{ where=Dimension('customer__country') }} = 'US')"` | Optional | | `limit` | Limit the data returned | `limit=10` | Optional | |`order` | Order the data returned | `order_by=['-order_gross_profit']` (remove `-` for ascending order) | Optional | | `explain` | If true, returns generated SQL for the data platform but does not execute | `explain=True` | Optional | @@ -215,21 +215,33 @@ select * from {{ ### Query with where filters -Where filters have three components: +Where filters in API allow for a filter list or string. We recommend using the filter list for production application as this format will realize all benefits from predicate pushdown where possible. -- `TimeDimension()` is used for any time dimension and requires a granularity argument - `TimeDimension('metric_time', 'DAY')` +Where Filters have a few objects that can be used: -- `Dimension()` - This is used for any categorical dimensions - `Dimension('customer__country')` +- `Dimension()` - This is used for any categorical or time dimensions. If used for a time dimension, granularity is required - `Dimension('metric_time').grain('week')` or `Dimension('customer__country')` - `Entity()` - used for entities like primary and foreign keys - `Entity('order_id')` -Use the following example to query using a `where` filter: +Note: If you prefer more strongly typed `where` clause, you can optionally use `TimeDimension` to separate out categorical dimensions from time ones. The `TimeDimesion` input takes the time dimension name and also requires granularity - an example is `TimeDimension('metric_time', 'MONTH')`. + +Use the following example to query using a `where` filter using the string format: + +```bash +select * from {{ +semantic_layer.query(metrics=['food_order_amount', 'order_gross_profit'], +group_by=[Dimension('metric_time').grain('month'),'customer__customer_type'], +where="{{ Dimension('metric_time'.grain('month') }} >= '2017-03-09' AND {{ Dimension('customer__customer_type' }} in ('new') AND {{ Entity('order_id') }} = 10") +}} +``` + +Use the following example to query using a `where` filter with a filter list format: ```bash select * from {{ semantic_layer.query(metrics=['food_order_amount', 'order_gross_profit'], group_by=[Dimension('metric_time').grain('month'),'customer__customer_type'], -where="{{ TimeDimension('metric_time', 'MONTH') }} >= '2017-03-09' AND {{ Dimension('customer__customer_type' }} in ('new') AND {{ Entity('order_id') }} = 10") +where=[{{ Dimension('metric_time'.grain('month') }} >= '2017-03-09', {{ Dimension('customer__customer_type' }} in ('new'), {{ Entity('order_id') }} = 10]) }} ``` From 678daaf41b3ac80576a0623936e6ac9351e82c9b Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Wed, 23 Aug 2023 14:05:31 +0100 Subject: [PATCH 02/14] Update website/docs/docs/dbt-cloud-apis/sl-jdbc.md --- website/docs/docs/dbt-cloud-apis/sl-jdbc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/dbt-cloud-apis/sl-jdbc.md b/website/docs/docs/dbt-cloud-apis/sl-jdbc.md index e4d1d6ebbaf..45aef7157e1 100644 --- a/website/docs/docs/dbt-cloud-apis/sl-jdbc.md +++ b/website/docs/docs/dbt-cloud-apis/sl-jdbc.md @@ -217,7 +217,7 @@ select * from {{ Where filters in API allow for a filter list or string. We recommend using the filter list for production application as this format will realize all benefits from predicate pushdown where possible. -Where Filters have a few objects that can be used: +Where Filters have a few objects that you can use: - `Dimension()` - This is used for any categorical or time dimensions. If used for a time dimension, granularity is required - `Dimension('metric_time').grain('week')` or `Dimension('customer__country')` From 9c850c799fa1ee0572134dba637db7c16fbe1192 Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Wed, 23 Aug 2023 14:07:07 +0100 Subject: [PATCH 03/14] Update website/docs/docs/dbt-cloud-apis/sl-jdbc.md --- website/docs/docs/dbt-cloud-apis/sl-jdbc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/dbt-cloud-apis/sl-jdbc.md b/website/docs/docs/dbt-cloud-apis/sl-jdbc.md index 45aef7157e1..3db72c845b7 100644 --- a/website/docs/docs/dbt-cloud-apis/sl-jdbc.md +++ b/website/docs/docs/dbt-cloud-apis/sl-jdbc.md @@ -225,7 +225,7 @@ Where Filters have a few objects that you can use: Note: If you prefer more strongly typed `where` clause, you can optionally use `TimeDimension` to separate out categorical dimensions from time ones. The `TimeDimesion` input takes the time dimension name and also requires granularity - an example is `TimeDimension('metric_time', 'MONTH')`. -Use the following example to query using a `where` filter using the string format: +Use the following example to query using a `where` filter with the string format: ```bash select * from {{ From 8f458f660cd00c37685e6b1747eade7951418e13 Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Wed, 23 Aug 2023 14:08:56 +0100 Subject: [PATCH 04/14] Update website/docs/docs/dbt-cloud-apis/sl-jdbc.md --- website/docs/docs/dbt-cloud-apis/sl-jdbc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/dbt-cloud-apis/sl-jdbc.md b/website/docs/docs/dbt-cloud-apis/sl-jdbc.md index 3db72c845b7..2dc256896c3 100644 --- a/website/docs/docs/dbt-cloud-apis/sl-jdbc.md +++ b/website/docs/docs/dbt-cloud-apis/sl-jdbc.md @@ -223,7 +223,7 @@ Where Filters have a few objects that you can use: - `Entity()` - used for entities like primary and foreign keys - `Entity('order_id')` -Note: If you prefer more strongly typed `where` clause, you can optionally use `TimeDimension` to separate out categorical dimensions from time ones. The `TimeDimesion` input takes the time dimension name and also requires granularity - an example is `TimeDimension('metric_time', 'MONTH')`. +Note: If you prefer a more strongly typed `where` clause, you can optionally use the `TimeDimension` feature. This helps separate out categorical dimensions from time-related ones. The `TimeDimesion` input takes the time dimension name and also requires granularity, like this: `TimeDimension('metric_time', 'MONTH')`. Use the following example to query using a `where` filter with the string format: From 832a64a1b38e7c7ce262065926feb5de63ab0f05 Mon Sep 17 00:00:00 2001 From: rpourzand Date: Tue, 29 Aug 2023 13:16:09 -0700 Subject: [PATCH 05/14] Update sl-jdbc.md updated with a queryable granularity example --- website/docs/docs/dbt-cloud-apis/sl-jdbc.md | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/website/docs/docs/dbt-cloud-apis/sl-jdbc.md b/website/docs/docs/dbt-cloud-apis/sl-jdbc.md index 92ffd0278c1..4f72b056818 100644 --- a/website/docs/docs/dbt-cloud-apis/sl-jdbc.md +++ b/website/docs/docs/dbt-cloud-apis/sl-jdbc.md @@ -98,9 +98,9 @@ semantic_layer.dimension_values(metrics=['food_order_amount'], group_by=['custom - + -Use this query to fetch queryable granularities for a list of metrics. This argument allows you to only show the time granularities that make sense for the source model that the metrics are built off of. +Use this query to fetch queryable granularities for a list of metrics. This API request allows you to only show the time granularities that make sense for the primary time dimension of the metrics (e.g., `metric_time`), but if you want queryable granularities for other time dimensions, you can use the `dimensions()` call, and find the column queryable_granularities. Note, `metrics` is a required argument that lists with one or multiple metrics in it. @@ -127,6 +127,21 @@ select * from {{ + + +Use this example query to fetch available granularities for all time dimesensions (the similar queryable granularities API call only returns granularities for the primary time dimensions for metrics). The following call is a derivative of the `dimensions()` call and specifically selects the granularities field. + +```bash +select NAME, QUERYABLE_GRANULARITIES from {{ + semantic_layer.dimensions( + metrics=["order_total"] + ) +}} + +``` + + + ## Querying the API for metric values @@ -245,7 +260,7 @@ where=[{{ Dimension('metric_time'.grain('month') }} >= '2017-03-09', {{ Dimensio }} ``` -### Query with a limit and order_by +### Query with a limit and order by Use the following example to query using a `limit` or `order_by` clauses: From 78f4276400d1bd5b3cae7a88031eef20d192f405 Mon Sep 17 00:00:00 2001 From: rpourzand Date: Tue, 29 Aug 2023 13:57:03 -0700 Subject: [PATCH 06/14] Update sl-jdbc.md adding the query Courtney introduced to get the name of the agg time dimension --- website/docs/docs/dbt-cloud-apis/sl-jdbc.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/website/docs/docs/dbt-cloud-apis/sl-jdbc.md b/website/docs/docs/dbt-cloud-apis/sl-jdbc.md index 4f72b056818..44fadedb986 100644 --- a/website/docs/docs/dbt-cloud-apis/sl-jdbc.md +++ b/website/docs/docs/dbt-cloud-apis/sl-jdbc.md @@ -142,6 +142,18 @@ select NAME, QUERYABLE_GRANULARITIES from {{ + + +It may be useful in your application to expose the names of the time dimensions that represent `metric_time` or the common thread across all metrics. +You can first query the `metrics()` argument to fetch a list of measures, then use the `measures()` call which will return the name(s) of the time dimensions that make up metric time. + +```bash +select * from {{ + semantic_layer.measures(metrics=['orders']) +}} +``` + + ## Querying the API for metric values From 86f959382d8f5cd568efd25c1d60e2eb18e4f7d0 Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Thu, 31 Aug 2023 13:09:04 +0100 Subject: [PATCH 07/14] Create predicate-pushdown.md add predicate pushdown term to use in docs --- website/docs/terms/predicate-pushdown.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 website/docs/terms/predicate-pushdown.md diff --git a/website/docs/terms/predicate-pushdown.md b/website/docs/terms/predicate-pushdown.md new file mode 100644 index 00000000000..cd17bd1b6ee --- /dev/null +++ b/website/docs/terms/predicate-pushdown.md @@ -0,0 +1,10 @@ +--- +id: predicate-pushdown +title: Predicate pushdown +description: A predicate pushdown is an expression used to determine what rows in a database apply to a particular query +displayText: Predicate pushdown +hoverSnippet: A predicate pushdown is an expression used to determine what rows in a database apply to a particular query +--- + +A predicate pushdown is an expression used to determine what rows in a database apply to a particular query. For example, if you filter in a `WHERE` clause based on a specific dimension value, the database searches to determine what values in the database apply to the query. The optimization known as "predicate pushdown" involves applying this filtering process to the database, leading to enhanced and faster query performance. + From 33800bbf79236c00a6143a93e57166179abf00f6 Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Thu, 31 Aug 2023 13:12:57 +0100 Subject: [PATCH 08/14] Update predicate-pushdown.md --- website/docs/terms/predicate-pushdown.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/terms/predicate-pushdown.md b/website/docs/terms/predicate-pushdown.md index cd17bd1b6ee..8e9bad85b6b 100644 --- a/website/docs/terms/predicate-pushdown.md +++ b/website/docs/terms/predicate-pushdown.md @@ -1,6 +1,6 @@ --- id: predicate-pushdown -title: Predicate pushdown +title: predicate pushdown description: A predicate pushdown is an expression used to determine what rows in a database apply to a particular query displayText: Predicate pushdown hoverSnippet: A predicate pushdown is an expression used to determine what rows in a database apply to a particular query From 5d68215df566888cbefa2b162cfe8e4f2c237ab6 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Thu, 31 Aug 2023 13:16:45 +0100 Subject: [PATCH 09/14] clarify predicate pushdown and add term --- website/docs/docs/dbt-cloud-apis/sl-jdbc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/dbt-cloud-apis/sl-jdbc.md b/website/docs/docs/dbt-cloud-apis/sl-jdbc.md index 44fadedb986..f847e9896c1 100644 --- a/website/docs/docs/dbt-cloud-apis/sl-jdbc.md +++ b/website/docs/docs/dbt-cloud-apis/sl-jdbc.md @@ -242,7 +242,7 @@ select * from {{ ### Query with where filters -Where filters in API allow for a filter list or string. We recommend using the filter list for production application as this format will realize all benefits from predicate pushdown where possible. +Where filters in API allow for a filter list or string. We recommend using the filter list for production application as this format will realize all benefits from the where possible. Where Filters have a few objects that you can use: From 97bd5a186f7f2dd0bbdc7552ae793904ebcd3750 Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Tue, 5 Sep 2023 15:17:17 +0100 Subject: [PATCH 10/14] Update website/docs/docs/dbt-cloud-apis/sl-jdbc.md --- website/docs/docs/dbt-cloud-apis/sl-jdbc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/dbt-cloud-apis/sl-jdbc.md b/website/docs/docs/dbt-cloud-apis/sl-jdbc.md index f847e9896c1..f60985b26db 100644 --- a/website/docs/docs/dbt-cloud-apis/sl-jdbc.md +++ b/website/docs/docs/dbt-cloud-apis/sl-jdbc.md @@ -100,7 +100,7 @@ semantic_layer.dimension_values(metrics=['food_order_amount'], group_by=['custom -Use this query to fetch queryable granularities for a list of metrics. This API request allows you to only show the time granularities that make sense for the primary time dimension of the metrics (e.g., `metric_time`), but if you want queryable granularities for other time dimensions, you can use the `dimensions()` call, and find the column queryable_granularities. +Use this query to fetch queryable granularities for a list of metrics. This API request allows you to only show the time granularities that make sense for the primary time dimension of the metrics (such as `metric_time`), but if you want queryable granularities for other time dimensions, you can use the `dimensions()` call, and find the column queryable_granularities. Note, `metrics` is a required argument that lists with one or multiple metrics in it. From e53523cf8d347f07c0ad2f95be2fed2f22ae4727 Mon Sep 17 00:00:00 2001 From: rpourzand Date: Mon, 18 Sep 2023 15:36:59 -0700 Subject: [PATCH 11/14] Update sl-jdbc.md removing one set of changes from this PR since it won't be shipped until a little later --- website/docs/docs/dbt-cloud-apis/sl-jdbc.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/website/docs/docs/dbt-cloud-apis/sl-jdbc.md b/website/docs/docs/dbt-cloud-apis/sl-jdbc.md index f60985b26db..6d9ed327153 100644 --- a/website/docs/docs/dbt-cloud-apis/sl-jdbc.md +++ b/website/docs/docs/dbt-cloud-apis/sl-jdbc.md @@ -165,7 +165,7 @@ To query metric values, here are the following parameters that are available: | `metrics` | The metric name as defined in your dbt metric configuration | `metrics=['revenue']` | Required | | `group_by` | Dimension names or entities to group by. We require a reference to the entity of the dimension (other than for the primary time dimension), which is pre-appended to the front of the dimension name with a double underscore. | `group_by=['user__country', 'metric_time']` | Optional | | `grain` | A parameter specific to any time dimension and changes the grain of the data from the default for the metric. | `group_by=[Dimension('metric_time')`
`grain('week\|day\|month\|quarter\|year')]` | Optional | -| `where` | A where clause that allows you to filter on dimensions and entities using parameters. This takes a filter list OR string. Inputs come with `Dimension`, and `Entity` objects. Granularity is required if the `Dimension` is a time dimension | `"{{ where=Dimension('customer__country') }} = 'US')"` | Optional | +| `where` | A where clause that allows you to filter on dimensions and entities using parameters - comes with `TimeDimension`, `Dimension`, and `Entity` objects. Granularity is required with `TimeDimension` | `"{{ where=Dimension('customer__country') }} = 'US')"` | Optional | | `limit` | Limit the data returned | `limit=10` | Optional | |`order` | Order the data returned | `order_by=['-order_gross_profit']` (remove `-` for ascending order) | Optional | | `explain` | If true, returns generated SQL for the data platform but does not execute | `explain=True` | Optional | @@ -244,13 +244,14 @@ select * from {{ Where filters in API allow for a filter list or string. We recommend using the filter list for production application as this format will realize all benefits from the where possible. -Where Filters have a few objects that you can use: +Where Filters have a three components that you can use: - `Dimension()` - This is used for any categorical or time dimensions. If used for a time dimension, granularity is required - `Dimension('metric_time').grain('week')` or `Dimension('customer__country')` -- `Entity()` - used for entities like primary and foreign keys - `Entity('order_id')` +-`TimeDimension()` - This is used for all time dimensions and requires a granularity argument - `TimeDimension('metric_time', 'MONTH)` + +- `Entity()` - This is used for entities like primary and foreign keys - `Entity('order_id')` -Note: If you prefer a more strongly typed `where` clause, you can optionally use the `TimeDimension` feature. This helps separate out categorical dimensions from time-related ones. The `TimeDimesion` input takes the time dimension name and also requires granularity, like this: `TimeDimension('metric_time', 'MONTH')`. Use the following example to query using a `where` filter with the string format: @@ -258,7 +259,7 @@ Use the following example to query using a `where` filter with the string format select * from {{ semantic_layer.query(metrics=['food_order_amount', 'order_gross_profit'], group_by=[Dimension('metric_time').grain('month'),'customer__customer_type'], -where="{{ Dimension('metric_time'.grain('month') }} >= '2017-03-09' AND {{ Dimension('customer__customer_type' }} in ('new') AND {{ Entity('order_id') }} = 10") +where="{{ TimeDimension('metric_time', 'MONTH') }} >= '2017-03-09' AND {{ Dimension('customer__customer_type' }} in ('new') AND {{ Entity('order_id') }} = 10") }} ``` @@ -268,7 +269,7 @@ Use the following example to query using a `where` filter with a filter list for select * from {{ semantic_layer.query(metrics=['food_order_amount', 'order_gross_profit'], group_by=[Dimension('metric_time').grain('month'),'customer__customer_type'], -where=[{{ Dimension('metric_time'.grain('month') }} >= '2017-03-09', {{ Dimension('customer__customer_type' }} in ('new'), {{ Entity('order_id') }} = 10]) +where=[{{ TimeDimension('metric_time', 'month')}} >= '2017-03-09', {{ Dimension('customer__customer_type' }} in ('new'), {{ Entity('order_id') }} = 10]) }} ``` From 86ac6dd8ffa4ee199214e443badac8075d773550 Mon Sep 17 00:00:00 2001 From: rpourzand Date: Mon, 18 Sep 2023 15:40:41 -0700 Subject: [PATCH 12/14] Update sl-jdbc.md typos --- website/docs/docs/dbt-cloud-apis/sl-jdbc.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/docs/dbt-cloud-apis/sl-jdbc.md b/website/docs/docs/dbt-cloud-apis/sl-jdbc.md index 6d9ed327153..e69f98417ae 100644 --- a/website/docs/docs/dbt-cloud-apis/sl-jdbc.md +++ b/website/docs/docs/dbt-cloud-apis/sl-jdbc.md @@ -248,7 +248,7 @@ Where Filters have a three components that you can use: - `Dimension()` - This is used for any categorical or time dimensions. If used for a time dimension, granularity is required - `Dimension('metric_time').grain('week')` or `Dimension('customer__country')` --`TimeDimension()` - This is used for all time dimensions and requires a granularity argument - `TimeDimension('metric_time', 'MONTH)` +- `TimeDimension()` - This is used for all time dimensions and requires a granularity argument - `TimeDimension('metric_time', 'MONTH)` - `Entity()` - This is used for entities like primary and foreign keys - `Entity('order_id')` @@ -269,7 +269,7 @@ Use the following example to query using a `where` filter with a filter list for select * from {{ semantic_layer.query(metrics=['food_order_amount', 'order_gross_profit'], group_by=[Dimension('metric_time').grain('month'),'customer__customer_type'], -where=[{{ TimeDimension('metric_time', 'month')}} >= '2017-03-09', {{ Dimension('customer__customer_type' }} in ('new'), {{ Entity('order_id') }} = 10]) +where=[{{ TimeDimension('metric_time', 'MONTH')}} >= '2017-03-09', {{ Dimension('customer__customer_type' }} in ('new'), {{ Entity('order_id') }} = 10]) }} ``` From de2e32501410d2e5b8523cb892de35dab4568eb1 Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Tue, 19 Sep 2023 10:14:19 +0100 Subject: [PATCH 13/14] Update sl-jdbc.md --- website/docs/docs/dbt-cloud-apis/sl-jdbc.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/website/docs/docs/dbt-cloud-apis/sl-jdbc.md b/website/docs/docs/dbt-cloud-apis/sl-jdbc.md index e69f98417ae..6ebc6d9d5ed 100644 --- a/website/docs/docs/dbt-cloud-apis/sl-jdbc.md +++ b/website/docs/docs/dbt-cloud-apis/sl-jdbc.md @@ -76,7 +76,7 @@ select * from {{ Use this query to fetch all dimensions for a metric. -Note, `metrics` is a required argument that lists with one or multiple metrics in it. +Note, `metrics` is a required argument that lists one or multiple metrics in it. ```bash select * from {{ @@ -89,7 +89,7 @@ select * from {{ Use this query to fetch dimension values for one or multiple metrics and single dimension. -Note, `metrics` is a required argument that lists with one or multiple metrics in it, and a single dimension. +Note, `metrics` is a required argument that lists one or multiple metrics in it, and a single dimension. ```bash select * from {{ @@ -102,7 +102,7 @@ semantic_layer.dimension_values(metrics=['food_order_amount'], group_by=['custom Use this query to fetch queryable granularities for a list of metrics. This API request allows you to only show the time granularities that make sense for the primary time dimension of the metrics (such as `metric_time`), but if you want queryable granularities for other time dimensions, you can use the `dimensions()` call, and find the column queryable_granularities. -Note, `metrics` is a required argument that lists with one or multiple metrics in it. +Note, `metrics` is a required argument that lists one or multiple metrics in it. ```bash select * from {{ @@ -220,7 +220,7 @@ select * from {{ ### Query with a time grain -Use the following example query to fetch multiple metrics with a change time dimension granularities: +Use the following example query to fetch multiple metrics with a change in time dimension granularities: ```bash select * from {{ @@ -242,9 +242,9 @@ select * from {{ ### Query with where filters -Where filters in API allow for a filter list or string. We recommend using the filter list for production application as this format will realize all benefits from the where possible. +Where filters in API allow for a filter list or string. We recommend using the filter list for production applications as this format will realize all benefits from the where possible. -Where Filters have a three components that you can use: +Where Filters have the following components that you can use: - `Dimension()` - This is used for any categorical or time dimensions. If used for a time dimension, granularity is required - `Dimension('metric_time').grain('week')` or `Dimension('customer__country')` From 15f9d70d0180c26c131ab8fc859db3e0fffb59a7 Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Tue, 19 Sep 2023 19:21:51 +0100 Subject: [PATCH 14/14] Update sl-jdbc.md --- website/docs/docs/dbt-cloud-apis/sl-jdbc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/dbt-cloud-apis/sl-jdbc.md b/website/docs/docs/dbt-cloud-apis/sl-jdbc.md index 6ebc6d9d5ed..b50dd99ec75 100644 --- a/website/docs/docs/dbt-cloud-apis/sl-jdbc.md +++ b/website/docs/docs/dbt-cloud-apis/sl-jdbc.md @@ -244,7 +244,7 @@ select * from {{ Where filters in API allow for a filter list or string. We recommend using the filter list for production applications as this format will realize all benefits from the where possible. -Where Filters have the following components that you can use: +Where filters have the following components that you can use: - `Dimension()` - This is used for any categorical or time dimensions. If used for a time dimension, granularity is required - `Dimension('metric_time').grain('week')` or `Dimension('customer__country')`