From 77605346cdfde5eb77d72563b086f4d4045dd98d Mon Sep 17 00:00:00 2001
From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com>
Date: Mon, 30 Sep 2024 22:45:47 +0100
Subject: [PATCH 1/4] Update metricflow-time-spine.md
clarify that the time spine models key must be placed in the `models/` directory. this pr also links to the (/reference/model-properties) page.
[slack thread](https://dbt-labs.slack.com/archives/C02NCQ9483C/p1727731703755399)
---
website/docs/docs/build/metricflow-time-spine.md | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/website/docs/docs/build/metricflow-time-spine.md b/website/docs/docs/build/metricflow-time-spine.md
index f3387399ffe..c5173c2f083 100644
--- a/website/docs/docs/build/metricflow-time-spine.md
+++ b/website/docs/docs/build/metricflow-time-spine.md
@@ -21,7 +21,8 @@ To see the generated SQL for the metric and dimension types that use time-spine
- You only need to configure time-spine models that the Semantic Layer should recognize.
- At a minimum, define a time-spine table for a daily grain.
- You can optionally define a time-spine table for a different granularity, like hourly.
-- Note that if you don’t have a date or calendar model in your project, you'll need to create one.
+- Note that if you don’t have a date or calendar model in your project, you'll need to create one.
+- The [`models` key](/reference/model-properties) in the time spine configuration must be placed in your `models/` directory.
- If you're looking to specify the grain of a time dimension so that MetricFlow can transform the underlying column to the required granularity, refer to the [Time granularity documentation](/docs/build/dimensions?dimension=time_gran)
If you already have a date dimension or time-spine table in your dbt project, you can point MetricFlow to this table by updating the `model` configuration to use this table in the Semantic Layer. This is a model-level configuration that tells dbt to use the model for time range joins in the Semantic Layer.
@@ -40,7 +41,7 @@ If you don’t have a date dimension table, you can still create one by using th
```yaml
-models:
+[models:](/reference/model-properties)
- name: time_spine_hourly
time_spine:
standard_granularity_column: date_hour # column for the standard grain of your table
@@ -56,7 +57,7 @@ models:
```
-For an example project, refer to our [Jaffle shop](https://github.com/dbt-labs/jaffle-sl-template/blob/main/models/marts/_models.yml) example.
+For an example project, refer to our [Jaffle shop](https://github.com/dbt-labs/jaffle-sl-template/blob/main/models/marts/_models.yml) example. Note that the [`models` key](/reference/model-properties) in the time spine configuration must be placed in your `models/` directory.
Now, break down the configuration above. It's pointing to a model called `time_spine_daily`. It sets the time spine configurations under the `time_spine` key. The `standard_granularity_column` is the lowest grain of the table, in this case, it's hourly. It needs to reference a column defined under the columns key, in this case, `date_hour`. Use the `standard_granularity_column` as the join key for the time spine table when joining tables in MetricFlow. Here, the granularity of the `standard_granularity_column` is set at the column level, in this case, `hour`.
From 59f07e19df6d7e00267260ba94546aef42f36940 Mon Sep 17 00:00:00 2001
From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com>
Date: Tue, 1 Oct 2024 09:18:44 +0100
Subject: [PATCH 2/4] Update metricflow-time-spine.md
---
website/docs/docs/build/metricflow-time-spine.md | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/website/docs/docs/build/metricflow-time-spine.md b/website/docs/docs/build/metricflow-time-spine.md
index c5173c2f083..5de3221a677 100644
--- a/website/docs/docs/build/metricflow-time-spine.md
+++ b/website/docs/docs/build/metricflow-time-spine.md
@@ -18,11 +18,14 @@ MetricFlow requires you to define a time-spine table as a model-level configurat
To see the generated SQL for the metric and dimension types that use time-spine joins, refer to the respective documentation or add the `compile=True` flag when querying the Semantic Layer to return the compiled SQL.
## Configuring time-spine in YAML
+
+- The time spine is a special model that tells dbt and MetricFlow how to use specific columns by defining their properties.
+- The [`models` key](/reference/model-properties) for the time spine must be in your `models/` directory.
- You only need to configure time-spine models that the Semantic Layer should recognize.
- At a minimum, define a time-spine table for a daily grain.
- You can optionally define a time-spine table for a different granularity, like hourly.
- Note that if you don’t have a date or calendar model in your project, you'll need to create one.
-- The [`models` key](/reference/model-properties) in the time spine configuration must be placed in your `models/` directory.
+
- If you're looking to specify the grain of a time dimension so that MetricFlow can transform the underlying column to the required granularity, refer to the [Time granularity documentation](/docs/build/dimensions?dimension=time_gran)
If you already have a date dimension or time-spine table in your dbt project, you can point MetricFlow to this table by updating the `model` configuration to use this table in the Semantic Layer. This is a model-level configuration that tells dbt to use the model for time range joins in the Semantic Layer.
From 7e63b181211381592ddac3d13a4bd9a40f33e3c8 Mon Sep 17 00:00:00 2001
From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com>
Date: Tue, 1 Oct 2024 09:23:31 +0100
Subject: [PATCH 3/4] Update model-properties.md
---
website/docs/reference/model-properties.md | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/website/docs/reference/model-properties.md b/website/docs/reference/model-properties.md
index 46fb0ca3bad..7576fc350f8 100644
--- a/website/docs/reference/model-properties.md
+++ b/website/docs/reference/model-properties.md
@@ -2,9 +2,9 @@
title: Model properties
---
-Models properties can be declared in `.yml` files in your `models/` directory (as defined by the [`model-paths` config](/reference/project-configs/model-paths)).
+Models properties can be declared in `.yml` files in your `models/` directory (as defined by the [`model-paths` config](/reference/project-configs/model-paths)).
-You can name these files `whatever_you_want.yml`, and nest them arbitrarily deeply in subfolders within the `models/` directory.
+You can name these files `whatever_you_want.yml`, and nest them arbitrarily deeply in subfolders within the `models/` directory. The [MetricFlow time spine](/docs/build/metricflow-time-spine) is a model property that tells dbt and MetricFlow how to use specific columns by defining their properties.
@@ -74,7 +74,3 @@ models:
-
From c7952a7106f721a718e00740df280f1dbbc16d30 Mon Sep 17 00:00:00 2001
From: Jeremy Yeo
Date: Tue, 1 Oct 2024 21:45:56 +1300
Subject: [PATCH 4/4] Update about-cloud-develop-defer.md
---
website/docs/docs/cloud/about-cloud-develop-defer.md | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/website/docs/docs/cloud/about-cloud-develop-defer.md b/website/docs/docs/cloud/about-cloud-develop-defer.md
index 4e2f70b7b82..472cabe13c5 100644
--- a/website/docs/docs/cloud/about-cloud-develop-defer.md
+++ b/website/docs/docs/cloud/about-cloud-develop-defer.md
@@ -51,7 +51,10 @@ The dbt Cloud CLI offers additional flexibility by letting you choose the source
```yml
-defer-env-id: '123456'
+context:
+ active-host: ...
+ active-project: ...
+ defer-env-id: '123456'
```
@@ -60,7 +63,7 @@ defer-env-id: '123456'
```yml
-dbt_cloud:
+dbt-cloud:
defer-env-id: '123456'
```