Skip to content

Commit

Permalink
new page and rn
Browse files Browse the repository at this point in the history
  • Loading branch information
mirnawong1 committed Aug 2, 2024
1 parent b49a75b commit c5a594d
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 8 deletions.
4 changes: 2 additions & 2 deletions website/docs/docs/build/dimensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ dbt sl query --metrics users_created,users_deleted --group-by metric_time__year
mf query --metrics users_created,users_deleted --group-by metric_time__year --order-by metric_time__year
```

You can set `is_partition` for time or categorical dimensions to define specific time spans. Additionally, use the `type_params` section to set `time_granularity` to adjust aggregation detail (like sub-daily (hourly), daily, weekly, and so on). For more sub-daily configuration details, refer to [sub-daily granularity](/docs/build/sub-daily).
You can set `is_partition` for time or categorical dimensions to define specific time spans. Additionally, use the `type_params` section to set `time_granularity` to adjust aggregation detail (like sub-daily (hourly), daily, weekly, and so on). For more sub-daily configuration details, refer to [sub-daily granularity](/docs/build/granularity).

<Tabs>

Expand Down Expand Up @@ -171,7 +171,7 @@ measures:

<TabItem value="time_gran" label="time_granularity">

`time_granularity` specifies the smallest level of detail that a measure or metric should be reported at, such as [sub-daily](/docs/build/metrics-overview#sub-daily-granularity), daily, weekly, monthly, quarterly, or yearly. Different granularity options are available, and each metric must have a specified granularity. For example, a metric specified with weekly granularity couldn't be aggregated to a daily grain.
`time_granularity` specifies the smallest level of detail that a measure or metric should be reported at, such as [sub-daily](/docs/build/granularity), daily, weekly, monthly, quarterly, or yearly. Different granularity options are available, and each metric must have a specified granularity. For example, a metric specified with weekly granularity couldn't be aggregated to a daily grain.

The current options for time granularity are day, week, month, quarter, and year.

Expand Down
12 changes: 10 additions & 2 deletions website/docs/docs/build/metrics-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ import SLCourses from '/snippets/_sl-course.md';
Sub-daily granularity enables you to query metrics at granularities at finer time grains below a day, such as hourly, minute, or even by the second. It support anything that `date_trunc` supports. This can be useful if you want more detailed analysis and for datasets where you need more granular time data, such as minute-by-minute event tracking.

For more configuration details, refer to [sub-daily granularity](/docs/build/sub-daily).
For more configuration details, refer to [sub-daily granularity](/docs/build/granularity).

## Conversion metrics

Expand Down Expand Up @@ -261,10 +261,18 @@ filter: |
{{ TimeDimension('time_dimension', 'granularity') }}
filter: |
{{ Metric('metric_name', group_by=['entity_name']) }} # Available in v1.8 or go [versionless](/docs/dbt-versions/upgrade-dbt-version-in-cloud#keep-on-latest-version).
{{ Metric('metric_name', group_by=['entity_name']) }} {# Available in v1.8 or go [versionless](/docs/dbt-versions/upgrade-dbt-version-in-cloud#keep-on-latest-version). }
```

</File>

For example, if I wanted to filter for the order date dimension, grouped by month, I'd use the following syntax:

```yaml
filter: |
{{ TimeDimension('order_date', 'month') }}
```

## Further configuration

You can set more metadata for your metrics, which can be used by other tools later on. The way this metadata is used will vary based on the specific integration partner
Expand Down
2 changes: 1 addition & 1 deletion website/docs/docs/build/simple.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Simple metrics are metrics that directly reference a single measure, without any

The parameters, description, and type for simple metrics are:

:::tip
:::tip
Note that we use the double colon (::) to indicate whether a parameter is nested within another parameter. So for example, `query_params::metrics` means the `metrics` parameter is nested under `query_params`.
:::

Expand Down
6 changes: 4 additions & 2 deletions website/docs/docs/build/sub-daily-granularity.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
---
title: Sub-daily granularity
id: "sub-daily"
id: "granularity"
description: "Sub-daily granularity enables you to query metrics at granularities at finer time grains below a day, such as hourly, minute, or even by the second. "
sidebar_label: "Sub-daily granularity"
tags: [Metrics, Semantic Layer]
pagination_next: "docs/build/conversion"
---


Sub-daily granularity enables you to query metrics at granularities at finer time grains below a day, such as hourly, minute, or even by the second. It support anything that `date_trunc` supports. Use sub-daily granularity for cumulative metrics, time spine models at sub-daily grains, and default grain settings for metrics.
Sub-daily granularity enables you to query metrics at granularities at finer time grains such as hourly, minute, or even by the second. It support anything that `date_trunc` supports. You can sub-daily granularity for cumulative metrics, time spine models at sub-daily grains, or default grain settings for metrics.

MetricFlow defaults to the `day` grain, while allowing you the ability to default granularity as a metric-level property.

This is particularly useful for more detailed analysis and for datasets where high-resolution time data is required, such as minute-by-minute event tracking.

Expand Down
3 changes: 3 additions & 0 deletions website/docs/docs/dbt-versions/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ 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.

## August 2024
- **New**: You can configure metrics at granularities at finer time grains, such as hourly, minute, or even by the second. This is particularly useful for more detailed analysis and for datasets where high-resolution time data is required, such as minute-by-minute event tracking. Refer to [sub-daily granularity](/docs/build/sub-daily-granularity) for more info.

## July 2024
- **New:** [Merge jobs](/docs/deploy/merge-jobs) for implementing [continuous deployment (CD)](/docs/deploy/continuous-deployment) workflows are now GA in dbt Cloud. Previously, you had to either set up a custom GitHub action or manually build the changes every time a pull request is merged.
- **New**: The ability to lint your SQL files from the dbt Cloud CLI is now available. To learn more, refer to [Lint SQL files](/docs/cloud/configure-cloud-cli#lint-sql-files).
Expand Down
2 changes: 1 addition & 1 deletion website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ const sidebarSettings = {
link: { type: "doc", id: "docs/build/metrics-overview" },
items: [
"docs/build/metrics-overview",
"docs/build/sub-daily",
"docs/build/granularity",
"docs/build/conversion",
"docs/build/cumulative",
"docs/build/derived",
Expand Down

0 comments on commit c5a594d

Please sign in to comment.