Skip to content

Commit

Permalink
Correcting grain: MONTH syntax (#4454)
Browse files Browse the repository at this point in the history
## What are you changing in this pull request and why?

Fixes `grain: MONTH` syntax.

Closes #4424

## Checklist
- [x] Review the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md)
and [About
versioning](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version)
so my content adheres to these guidelines.
- [x] Add a checklist item for anything that needs to happen before this
PR is merged, such as "needs technical review" or "change base branch."
  • Loading branch information
matthewshaver authored Nov 13, 2023
2 parents d8b7299 + 36b75ff commit 309482b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions website/docs/docs/dbt-cloud-apis/sl-graphql.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
}
Expand All @@ -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
Expand All @@ -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
}
Expand All @@ -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
Expand All @@ -368,7 +368,7 @@ mutation {
compileSql(
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"}]
) {
sql
}
Expand Down

0 comments on commit 309482b

Please sign in to comment.