Skip to content

Commit

Permalink
Update sl-jdbc.md
Browse files Browse the repository at this point in the history
Adding new JDBC metadata commands!
  • Loading branch information
rpourzand authored Jul 20, 2023
1 parent aebdcc5 commit bd6dd60
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion website/docs/docs/dbt-cloud-apis/sl-jdbc.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ select * from {{
semantic_layer.dimensions(metrics=['food_order_amount'])}}
```
</TabItem>
<TabItem value="dimensionvalueformetrics" label="Fetch dimension values metrics">
Expand All @@ -97,6 +96,35 @@ semantic_layer.dimension_values(metrics=["food_order_amount"], group_by="custome
</TabItem>
<TabItem value="queryablegranularitiesformetrics" label="Fetch queryable time granularities for metrics">
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.
Note, `metrics` is a required argument that lists with one or multiple metrics in it.
```bash
select * from {{
semantic_layer.queryable_granularities(metrics=['food_order_amount', 'order_gross_profit'])}}
```
</TabItem>
<TabItem value="metricsfordimensions" label="Fetch available metrics given dimensions">
Use this query to fetch available metrics given dimensions. This command is essentially the opposite of getting dimensions given a list of metrics.
Note, `group_by` is a required argument that lists one or multiple dimensions in it.
```bash
select * from {{
semantic_layer.metrics_for_dimensions(group_by=['customer__customer_type'])

}}
```
</TabItem>
</Tabs>
## Querying the API for metric values
Expand Down

0 comments on commit bd6dd60

Please sign in to comment.