Skip to content

Commit

Permalink
Update sl-graphql.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rpourzand authored Aug 25, 2023
1 parent 53e1314 commit 204ca65
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions website/docs/docs/dbt-cloud-apis/sl-graphql.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ metrics: [String!]!
): [Dimension!]!
```

**Fetch available time granularities given metrics**
**Fetch available primary time granularities given metrics**

```graphql
queryableGranularities(
Expand Down Expand Up @@ -207,8 +207,8 @@ DimensionType = [CATEGORICAL, TIME]
mutation {
createQuery(
environmentId: <env_id>
metrics: ["food_order_amount", "order_gross_profit"]
groupBy: ["metric_time"] - TODO update with syntax for object
metrics: [{name: "food_order_amount"}]
groupBy: [{name: "metric_time}, {name:"customer__customer_type"}]
) {
queryId
}
Expand All @@ -221,22 +221,22 @@ mutation {
mutation {
createQuery(
environmentId: <env_id>
metrics: ["food_order_amount", "order_gross_profit"]
groupBy: ["metric_time__month"] - TODO update with syntax for object
metrics: [{name:"order_total"}]
groupBy: [{name:"metric_time", grain:"month"}]
) {
queryId
}
}
```
**Query with a categorical Dimension**
**Query two metrics with a categorical Dimension**
```graphql
mutation {
createQuery(
environmentId: <env_id>
metrics: ["food_order_amount", "order_gross_profit"]
groupBy: ["metric_time__month", "customer__customer_type"] - TODO update with syntax for object
metrics: [{name: "food_order_amount"}, {name: "order_gross_profit"}]
groupBy: [{name: "metric_time, grain: "month"}, {name:"customer__customer_type"}]
) {
queryId
}
Expand Down Expand Up @@ -271,8 +271,8 @@ mutation {
mutation {
createQuery(
environmentId: <env_id>
metrics: ["food_order_amount", "order_gross_profit"]
groupBy: ["metric_time__month", "customer__customer_type")] - TODO update with syntax for object
metrics: [{name: "food_order_amount"}, {name: "order_gross_profit"}]
groupBy: [{name: "metric_time, grain: "month"}, {name:"customer__customer_type"}]
order: ["-order_gross_profit"]
limit: 10
) {
Expand All @@ -287,8 +287,8 @@ mutation {
mutation {
createQuery(
environmentId: <env_id>
metrics: ["food_order_amount", "order_gross_profit"]
groupBy: ["metric_time__month", "customer__customer_type"] - TODO update with syntax for object
metrics: [{name: "food_order_amount"} {name: "order_gross_profit"}]
groupBy: [{name: "metric_time, grain: "month"}, {name:"customer__customer_type"}]
explain: TODO
) {
queryId
Expand Down

0 comments on commit 204ca65

Please sign in to comment.