From 4432996bcd7f4a14e193695bcfa01c8a1162ca53 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Mon, 28 Oct 2024 20:11:52 +0000 Subject: [PATCH 01/14] add rn --- website/docs/docs/dbt-versions/release-notes.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/website/docs/docs/dbt-versions/release-notes.md b/website/docs/docs/dbt-versions/release-notes.md index e28a5233f9f..90d0877491a 100644 --- a/website/docs/docs/dbt-versions/release-notes.md +++ b/website/docs/docs/dbt-versions/release-notes.md @@ -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 can paginate `semantic_layer.metrics()` and `semantic_layer.dimensions()` for metrics and dimensions using `page_size` and `page_number` parameters. ADD LINK TO JDBC AND ADD TO JDBC DOCS +- **Enhancement**: The dbt Semantic Layer JDBC now allows users to filter down the result set of the metadata call to anything that contains the substring of search if provided, otherwise just return everything as per usual. ADD LINK TO JDBC AND ADD TO JDBC DOCS +- **Fix**: The dbt Semantic Layer Excel integration 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. From b217cb463b8bd87ed7501c5409f90c85aa98b5df Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Tue, 29 Oct 2024 11:06:52 +0000 Subject: [PATCH 02/14] update jdbc doc --- website/docs/docs/dbt-cloud-apis/sl-jdbc.md | 34 +++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/website/docs/docs/dbt-cloud-apis/sl-jdbc.md b/website/docs/docs/dbt-cloud-apis/sl-jdbc.md index 3a9832dd706..fa58cc035d7 100644 --- a/website/docs/docs/dbt-cloud-apis/sl-jdbc.md +++ b/website/docs/docs/dbt-cloud-apis/sl-jdbc.md @@ -149,6 +149,40 @@ select * from {{ + + +You can filter your metrics to include only those that contain a specific substring. 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. + + + + + +In cases where user manifests are large, pagination is a useful workaround to prevent query character limits in the data warehouse. You can paginate results for both `semantic_layer.metrics()` and `semantic_layer.dimensions()` calls using the `page_size` and `page_number` parameters. + +- `page_size`: Optional, sets the number of records per page. If left as `None`, there is no page limit. +- `page_number`: Required, specifies the page number to retrieve. Defaults to `1` 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(...). +``` + + You can use this example query to list all available saved queries in your dbt project. From f59246ec37245633c9ba8bc0da106b727e185961 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Tue, 29 Oct 2024 11:53:25 +0000 Subject: [PATCH 03/14] add rn and jdbc --- website/docs/docs/dbt-cloud-apis/sl-jdbc.md | 7 ++++--- website/docs/docs/dbt-versions/release-notes.md | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/website/docs/docs/dbt-cloud-apis/sl-jdbc.md b/website/docs/docs/dbt-cloud-apis/sl-jdbc.md index fa58cc035d7..84150695e2d 100644 --- a/website/docs/docs/dbt-cloud-apis/sl-jdbc.md +++ b/website/docs/docs/dbt-cloud-apis/sl-jdbc.md @@ -163,10 +163,10 @@ If no substring is provided, the query returns all metrics. -In cases where user manifests are large, pagination is a useful workaround to prevent query character limits in the data warehouse. You can paginate results for both `semantic_layer.metrics()` and `semantic_layer.dimensions()` calls using the `page_size` and `page_number` parameters. +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. - `page_size`: Optional, sets the number of records per page. If left as `None`, there is no page limit. -- `page_number`: Required, specifies the page number to retrieve. Defaults to `1` if not specified. +- `page_number`: Optional, specifies the page number to retrieve. Defaults to `1` (first page) if not specified. Examples: @@ -179,8 +179,9 @@ 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(...). ``` + +You can use the same pagination parameters for `semantic_layer.dimensions(...)`. diff --git a/website/docs/docs/dbt-versions/release-notes.md b/website/docs/docs/dbt-versions/release-notes.md index 90d0877491a..c36ddad8dfb 100644 --- a/website/docs/docs/dbt-versions/release-notes.md +++ b/website/docs/docs/dbt-versions/release-notes.md @@ -20,9 +20,9 @@ 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 can paginate `semantic_layer.metrics()` and `semantic_layer.dimensions()` for metrics and dimensions using `page_size` and `page_number` parameters. ADD LINK TO JDBC AND ADD TO JDBC DOCS -- **Enhancement**: The dbt Semantic Layer JDBC now allows users to filter down the result set of the metadata call to anything that contains the substring of search if provided, otherwise just return everything as per usual. ADD LINK TO JDBC AND ADD TO JDBC DOCS -- **Fix**: The dbt Semantic Layer Excel integration now correctly surfaces errors when a query fails to execute. Previously, it was not clear why a query failed to run. +- **Enhancement**: The dbt Semantic Layer JDBC now allows users to paginate can 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. - **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. From bbb78caaa0cfdf1644575b08867f48a22ba31c92 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Tue, 29 Oct 2024 12:23:10 +0000 Subject: [PATCH 04/14] add retro rn --- website/docs/docs/dbt-versions/release-notes.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/website/docs/docs/dbt-versions/release-notes.md b/website/docs/docs/dbt-versions/release-notes.md index c36ddad8dfb..95b506d512e 100644 --- a/website/docs/docs/dbt-versions/release-notes.md +++ b/website/docs/docs/dbt-versions/release-notes.md @@ -71,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`. @@ -119,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 times 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 +- **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. From 0770e4ea147a632aff705715833b929cfe85db59 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Tue, 29 Oct 2024 12:33:13 +0000 Subject: [PATCH 05/14] update to expandables --- website/docs/docs/dbt-cloud-apis/sl-jdbc.md | 40 ++++++++++----------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/website/docs/docs/dbt-cloud-apis/sl-jdbc.md b/website/docs/docs/dbt-cloud-apis/sl-jdbc.md index 84150695e2d..50197c620dc 100644 --- a/website/docs/docs/dbt-cloud-apis/sl-jdbc.md +++ b/website/docs/docs/dbt-cloud-apis/sl-jdbc.md @@ -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: - + You can use this query to fetch all defined metrics in your dbt project: @@ -65,9 +65,9 @@ select * from {{ semantic_layer.metrics() }} ``` - + - + You can use this query to fetch all dimensions for a metric. @@ -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'])}} ``` - + - + You can use this query to fetch dimension values for one or multiple metrics and a single dimension. @@ -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'])}} ``` - + - + You can use this query to fetch queryable granularities for a list of metrics. @@ -103,9 +103,9 @@ select * from {{ semantic_layer.queryable_granularities(metrics=['food_order_amount', 'order_gross_profit'])}} ``` - + - + 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. @@ -117,9 +117,9 @@ select * from {{ }} ``` - + - + 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). @@ -133,9 +133,9 @@ select NAME, QUERYABLE_GRANULARITIES from {{ }} ``` - + - + 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. @@ -147,9 +147,9 @@ select * from {{ }} ``` - + - + You can filter your metrics to include only those that contain a specific substring. Use the `search` argument to specify the substring you want to match. @@ -159,9 +159,9 @@ select * from {{ semantic_layer.metrics(search='order') }} If no substring is provided, the query returns all metrics. - + - + 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. @@ -182,9 +182,9 @@ select * from {{ semantic_layer.metrics() }} ``` You can use the same pagination parameters for `semantic_layer.dimensions(...)`. - + - + You can use this example query to list all available saved queries in your dbt project. @@ -200,7 +200,7 @@ select * from semantic_layer.saved_queries() | NAME | DESCRIPTION | LABEL | METRICS | GROUP_BY | WHERE_FILTER | ``` - +