From 6983bdb43f7ced6a923c2e0dfa73391187cac3f0 Mon Sep 17 00:00:00 2001 From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> Date: Mon, 13 Nov 2023 13:15:28 -0500 Subject: [PATCH] Correcting grain: MONTH syntax --- website/docs/docs/dbt-cloud-apis/sl-graphql.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/website/docs/docs/dbt-cloud-apis/sl-graphql.md b/website/docs/docs/dbt-cloud-apis/sl-graphql.md index 0e39f50f60a..71ad175c11c 100644 --- a/website/docs/docs/dbt-cloud-apis/sl-graphql.md +++ b/website/docs/docs/dbt-cloud-apis/sl-graphql.md @@ -282,7 +282,7 @@ mutation { createQuery( environmentId: BigInt! metrics: [{name: "order_total"}] - groupBy: [{name: "metric_time", grain: "month"}] + groupBy: [{name: "metric_time", grain: MONTH}] ) { queryId } @@ -298,7 +298,7 @@ mutation { createQuery( environmentId: BigInt! metrics: [{name: "food_order_amount"}, {name: "order_gross_profit"}] - groupBy: [{name: "metric_time, grain: "month"}, {name: "customer__customer_type"}] + groupBy: [{name: "metric_time, grain: MONTH}, {name: "customer__customer_type"}] ) { queryId } @@ -320,7 +320,7 @@ mutation { createQuery( environmentId: BigInt! metrics:[{name: "order_total"}] - groupBy:[{name: "customer__customer_type"}, {name: "metric_time", grain: "month"}] + groupBy:[{name: "customer__customer_type"}, {name: "metric_time", grain: MONTH}] where:[{sql: "{{ Dimension('customer__customer_type') }} = 'new'"}, {sql:"{{ Dimension('metric_time').grain('month') }} > '2022-10-01'"}] ) { queryId @@ -335,8 +335,8 @@ mutation { createQuery( environmentId: BigInt! metrics: [{name: "order_total"}] - groupBy: [{name: "metric_time", grain: "month"}] - orderBy: [{metric: {name: "order_total"}}, {groupBy: {name: "metric_time", grain: "month"}, descending:true}] + groupBy: [{name: "metric_time", grain: MONTH}] + orderBy: [{metric: {name: "order_total"}}, {groupBy: {name: "metric_time", grain: MONTH}, descending:true}] ) { queryId } @@ -351,7 +351,7 @@ mutation { createQuery( environmentId: BigInt! metrics: [{name:"food_order_amount"}, {name: "order_gross_profit"}] - groupBy: [{name:"metric_time, grain: "month"}, {name: "customer__customer_type"}] + groupBy: [{name:"metric_time, grain: MONTH}, {name: "customer__customer_type"}] limit: 10 ) { queryId