Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oct MF release notes and jdbc #6377

Merged
merged 16 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 cases where user manifests are large, pagination is a useful way to prevent query character limits in the data platform. You can paginate results for both `semantic_layer.metrics()` and `semantic_layer.dimensions()` calls using the `page_size` and `page_number` parameters.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"In cases where user manifests are large, pagination is a useful way to prevent query character limits in the data platform. You can paginate results"

Change to: "In the case when you don't want to return the full result set from a metadata call you can paginate the resluts.."

mirnawong1 marked this conversation as resolved.
Show resolved Hide resolved

- `page_size`: This is an optional feature which sets the number of records per page. If left as `None`, there is no page limit.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to --> This is an optional variable which sets the number of records per page. If left as None, there is no page limit.

mirnawong1 marked this conversation as resolved.
Show resolved Hide resolved
- `page_number`: This is another optional feature which specifies the page number to retrieve. Defaults to `1` (first page) if not specified.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

mirnawong1 marked this conversation as resolved.
Show resolved Hide resolved

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
8 changes: 8 additions & 0 deletions website/docs/docs/dbt-versions/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ Release notes are grouped by month for both multi-tenant and virtual private clo

## 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.
mirnawong1 marked this conversation as resolved.
Show resolved Hide resolved
- **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.

- **Behavior change:** User API tokens have been deprecated. Update to [personal access tokens](/docs/dbt-cloud-apis/user-tokens) if you have any still in use.
- **New**: The dbt Cloud IDE supports signed commits for Git, available for Enterprise plans. You can sign your Git commits when pushing them to the repository to prevent impersonation and enhance security. Supported Git providers are GitHub and GitLab. Refer to [Git commit signing](/docs/cloud/dbt-cloud-ide/git-commit-signing.md) for more information.
- **New:** With dbt Mesh, you can now enable bidirectional dependencies across your projects. Previously, dbt enforced dependencies to only go in one direction. dbt checks for cycles across projects and raises errors if any are detected. For details, refer to [Cycle detection](/docs/collaborate/govern/project-dependencies#cycle-detection). There's also the [Intro to dbt Mesh](/best-practices/how-we-mesh/mesh-1-intro) guide to help you learn more best practices.
Expand Down Expand Up @@ -67,6 +71,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 @@ -115,6 +121,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. For multiple time spines per granularity, an error message will be displayed.
mirnawong1 marked this conversation as resolved.
Show resolved Hide resolved
- **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
Loading