Skip to content

Commit

Permalink
oct MF release notes and jdbc (#6377)
Browse files Browse the repository at this point in the history
this pr adds the oct SL release notes as mentioned in
[linear](https://linear.app/dbt-labs/view/release-note-and-docs-view-07352a33cd9c5),
as well as adds metadata calls for the jdbc doc.

<!-- vercel-deployment-preview -->
---
🚀 Deployment available! Here are the direct links to the updated files:


-
https://docs-getdbt-com-git-oct-sl-rn-dbt-labs.vercel.app/docs/dbt-cloud-apis/sl-jdbc
-
https://docs-getdbt-com-git-oct-sl-rn-dbt-labs.vercel.app/docs/dbt-versions/release-notes

<!-- end-vercel-deployment-preview -->

---------

Co-authored-by: nataliefiann <[email protected]>
  • Loading branch information
mirnawong1 and nataliefiann authored Oct 30, 2024
1 parent 69eb0da commit 8459a73
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 17 deletions.
67 changes: 51 additions & 16 deletions website/docs/docs/dbt-cloud-apis/sl-jdbc.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ The Semantic Layer JDBC API has built-in metadata calls which can provide a user

Expand the following toggles for examples and metadata commands:

<DetailsToggle alt_header="Fetch defined metrics">
<Expandable alt_header="Fetch defined metrics">

You can use this query to fetch all defined metrics in your dbt project:

Expand All @@ -65,9 +65,9 @@ select * from {{
semantic_layer.metrics()
}}
```
</DetailsToggle>
</Expandable>
<DetailsToggle alt_header="Fetch dimension for a metric">
<Expandable alt_header="Fetch dimension for a metric">
You can use this query to fetch all dimensions for a metric.
Expand All @@ -77,9 +77,9 @@ Note, metrics is a required argument that lists one or multiple metrics in it.
select * from {{
semantic_layer.dimensions(metrics=['food_order_amount'])}}
```
</DetailsToggle>
</Expandable>
<DetailsToggle alt_header="Fetch dimension values">
<Expandable alt_header="Fetch dimension values">
You can use this query to fetch dimension values for one or multiple metrics and a single dimension.
Expand All @@ -89,9 +89,9 @@ Note, metrics is a required argument that lists one or multiple metrics, and a s
select * from {{
semantic_layer.dimension_values(metrics=['food_order_amount'], group_by=['customer__customer_name'])}}
```
</DetailsToggle>
</Expandable>
<DetailsToggle alt_header="Fetch granularities for metrics">
<Expandable alt_header="Fetch granularities for metrics">
You can use this query to fetch queryable granularities for a list of metrics.
Expand All @@ -103,9 +103,9 @@ select * from {{
semantic_layer.queryable_granularities(metrics=['food_order_amount', 'order_gross_profit'])}}
```
</DetailsToggle>
</Expandable>
<DetailsToggle alt_header="Fetch available metrics given dimensions">
<Expandable alt_header="Fetch available metrics given dimensions">
You can use this query to fetch available metrics given dimensions. This command is essentially the opposite of getting dimensions given a list of metrics.
Expand All @@ -117,9 +117,9 @@ select * from {{
}}
```
</DetailsToggle>
</Expandable>
<DetailsToggle alt_header="Fetch granularities for all time dimensions">
<Expandable alt_header="Fetch granularities for all time dimensions">
You can use this example query to fetch available granularities for all time dimensions (the similar queryable granularities API call only returns granularities for the primary time dimensions for metrics).
Expand All @@ -133,9 +133,9 @@ select NAME, QUERYABLE_GRANULARITIES from {{
}}
```
</DetailsToggle>
</Expandable>
<DetailsToggle alt_header="Fetch primary time dimension names">
<Expandable alt_header="Fetch primary time dimension names">
It may be useful in your application to expose the names of the time dimensions that represent metric_time or the common thread across all metrics.
Expand All @@ -147,9 +147,44 @@ select * from {{
}}
```
</DetailsToggle>
</Expandable>
<Expandable alt_header="Fetch metrics by substring search">
You can filter your metrics to include only those that contain a specific substring (sequence of characters contained within a larger string (text)). Use the `search` argument to specify the substring you want to match.
```sql
select * from {{ semantic_layer.metrics(search='order') }}
```
If no substring is provided, the query returns all metrics.
<DetailsToggle alt_header="List saved queries">
</Expandable>
<Expandable alt_header="Paginate metadata calls">
In the case when you don't want to return the full result set from a metadata call, you can paginate the results for both `semantic_layer.metrics()` and `semantic_layer.dimensions()` calls using the `page_size` and `page_number` parameters.
- `page_size`: This is an optional variable which sets the number of records per page. If left as None, there is no page limit.
- `page_number`: This is an optional variable which specifies the page number to retrieve. Defaults to `1` (first page) if not specified.
Examples:
```sql
-- Retrieves the 5th page with a page size of 10 metrics
select * from {{ semantic_layer.metrics(page_size=10, page_number=5) }}
-- Retrieves the 1st page with a page size of 10 metrics
select * from {{ semantic_layer.metrics(page_size=10) }}
-- Retrieves all metrics without pagination
select * from {{ semantic_layer.metrics() }}
```
You can use the same pagination parameters for `semantic_layer.dimensions(...)`.
</Expandable>
<Expandable alt_header="List saved queries">
You can use this example query to list all available saved queries in your dbt project.
Expand All @@ -165,7 +200,7 @@ select * from semantic_layer.saved_queries()
| NAME | DESCRIPTION | LABEL | METRICS | GROUP_BY | WHERE_FILTER |
```
</DetailsToggle>
</Expandable>
<!--
<Tabs>
Expand Down
9 changes: 8 additions & 1 deletion website/docs/docs/dbt-versions/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ Release notes are grouped by month for both multi-tenant and virtual private clo
\* The official release date for this new format of release notes is May 15th, 2024. Historical release notes for prior dates may not reflect all available features released earlier this year or their tenancy availability.

## October 2024


- **Enhancement**: The dbt Semantic Layer JDBC now allows users to paginate `semantic_layer.metrics()` and `semantic_layer.dimensions()` for metrics and dimensions using `page_size` and `page_number` parameters. Refer to [Paginate metadata calls](/docs/dbt-cloud-apis/sl-jdbc#querying-the-api-for-metric-metadata) for more information.
- **Enhancement**: The dbt Semantic Layer JDBC now allows you to filter your metrics to include only those that contain a specific substring, using the `search` parameter. If no substring is provided, the query returns all metrics. Refer to [Fetch metrics by substring search](/docs/dbt-cloud-apis/sl-jdbc#querying-the-api-for-metric-metadata) for more information.
- **Fix**: The [dbt Semantic Layer Excel integration](/docs/cloud-integrations/semantic-layer/excel) now correctly surfaces errors when a query fails to execute. Previously, it was not clear why a query failed to run.
- **Fix:** Previously, POST requests to the Jobs API with invalid `cron` strings would return HTTP response status code 500s but would update the underlying entity. Now, POST requests to the Jobs API with invalid `cron` strings will result in status code 400s, without the underlying entity being updated.
- **Fix:** Fixed an issue where the `Source` view page in dbt Explorer did not correctly display source freshness status if older than 30 days.
- **Fix:** The UI now indicates when the description of a model is inherited from a catalog comment.
Expand Down Expand Up @@ -70,6 +73,8 @@ Release notes are grouped by month for both multi-tenant and virtual private clo

## September 2024

- **Fix**: MetricFlow updated `get_and_expire` to replace the unsupported `GETEX` command with a `GET` and conditional expiration, ensuring compatibility with Azure Redis 6.0.
- **Enhancement**: The [dbt Semantic Layer Python SDK](/docs/dbt-cloud-apis/sl-python) now supports `TimeGranularity` custom grain for metrics. This feature allows you to define custom time granularities for metrics, such as `fiscal_year` or `retail_month`, to query data using non-standard time periods.
- **New**: Use the dbt Copilot AI engine to generate semantic model for your models, now available in beta. dbt Copilot automatically generates documentation, tests, and now semantic models based on the data in your model, . To learn more, refer to [dbt Copilot](/docs/cloud/dbt-copilot).
- **New**: Use the new recommended syntax for [defining `foreign_key` constraints](/reference/resource-properties/constraints) using `refs`, available in dbt Cloud Versionless. This will soon be released in dbt Core v1.9. This new syntax will capture dependencies and works across different environments.
- **Enhancement**: You can now run [Semantic Layer commands](/docs/build/metricflow-commands) commands in the [dbt Cloud IDE](/docs/cloud/dbt-cloud-ide/develop-in-the-cloud). The supported commands are `dbt sl list`, `dbt sl list metrics`, `dbt sl list dimension-values`, `dbt sl list saved-queries`, `dbt sl query`, `dbt sl list dimensions`, `dbt sl list entities`, and `dbt sl validate`.
Expand Down Expand Up @@ -118,6 +123,8 @@ Release notes are grouped by month for both multi-tenant and virtual private clo
- **New:** Enabled `where` filters on dimensions (included in saved queries) to use the cache during query time. This means you can now dynamically filter your dashboards without losing the performance benefits of caching. Refer to [caching](/docs/use-dbt-semantic-layer/sl-cache#result-caching) for more information.
- **Enhancement:** In [Google Sheets](/docs/cloud-integrations/semantic-layer/gsheets), we added information icons and descriptions to metrics and dimensions options in the Query Builder menu. Click on the **Info** icon button to view a description of the metric or dimension. Available in the following Query Builder menu sections: metric, group by, where, saved selections, and saved queries.
- **Enhancement:** In [Google Sheets](/docs/cloud-integrations/semantic-layer/gsheets), you can now apply granularity to all time dimensions, not just metric time. This update uses our [APIs](/docs/dbt-cloud-apis/sl-api-overview) to support granularity selection on any chosen time dimension.
- **Enhancement**: MetricFlow time spine warnings now prompt users to configure missing or small-grain-time spines. An error message is displayed for multiple time spines per granularity.
- **Enhancement**: Errors now display if no time spine is configured at the requested or smaller granularity.
- **Enhancement:** Improved querying error message when no semantic layer credentials were set.
- **Enhancement:** Querying grains for cumulative metrics now returns multiple granularity options (day, week, month, quarter, year) like all other metric types. Previously, you could only query one grain option for cumulative metrics.
- **Fix:** Removed errors that prevented querying cumulative metrics with other granularities.
Expand Down

0 comments on commit 8459a73

Please sign in to comment.