Skip to content

Commit

Permalink
Update sl-jdbc.md
Browse files Browse the repository at this point in the history
We're making some changes to our API (not released yet), so I'm preemptively adding info.
  • Loading branch information
rpourzand authored Dec 7, 2023
1 parent 1a835bb commit e619ffa
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions website/docs/docs/dbt-cloud-apis/sl-jdbc.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,14 @@ Where filters in API allow for a filter list or string. We recommend using the f
Where Filters have a few objects that you can use:
- `Dimension()` - 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')`
- `Dimension()` - Used for any categorical or time dimensions. `Dimension('metric_time').grain('week')` or `Dimension('customer__country')`
- `Entity()` - Used for entities like primary and foreign keys - `Entity('order_id')`
Note: If you prefer a more explicit path to create the `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')`.
Note: If you prefer a more explicit path to create the `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')`.
For both `TimeDimension()` and `Dimension()` objects, the grain is only required if the aggregation time dimension for the measures / metrics associated with the where filter is not the same for all measures.
- Use the following example to query using a `where` filter with the string format:
Expand Down Expand Up @@ -315,7 +318,7 @@ semantic_layer.query(metrics=['food_order_amount', 'order_gross_profit'],
order_by=[-'order_gross_profit']
}}
```
If you are ordering by an object that's been operated on (e.g., change granularity), or you are using the full object notation, descending order must look like:
If you are ordering by an object that's been operated on (e.g., you changed the the granularity of the time dimension), or you are using the full object notation, descending order must look like:
```bash
select * from {{
Expand Down

0 comments on commit e619ffa

Please sign in to comment.