Skip to content

Commit

Permalink
adding x proj ref to overview page (#5999)
Browse files Browse the repository at this point in the history
  • Loading branch information
mirnawong1 authored Sep 2, 2024
1 parent 51e2108 commit ea9f88b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 11 additions & 4 deletions website/docs/docs/build/metricflow-time-spine.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,13 @@ and date_hour < dateadd(day, 30, current_timestamp())
```
</VersionBlock>


Use this model if you're using BigQuery. BigQuery supports `DATE()` instead of `TO_DATE()`:
<VersionBlock lastVersion="1.6">

<File name="metricflow_time_spine.sql">

```sql
-- BigQuery supports DATE() instead of TO_DATE(). Use this model if you're using BigQuery
{{config(materialized='table')}}
with days as (
{{dbt_utils.date_spine(
Expand All @@ -140,13 +143,15 @@ from final
where date_day > dateadd(year, -4, current_timestamp())
and date_hour < dateadd(day, 30, current_timestamp())
```

</File>
</VersionBlock>

<VersionBlock firstVersion="1.7">


<File name="metricflow_time_spine.sql">

```sql
-- BigQuery supports DATE() instead of TO_DATE(). Use this model if you're using BigQuery
{{config(materialized='table')}}
with days as (
{{dbt.date_spine(
Expand All @@ -168,7 +173,9 @@ from final
where date_day > dateadd(year, -4, current_timestamp())
and date_hour < dateadd(day, 30, current_timestamp())
```
</File>
</VersionBlock>

</File>

## Hourly time spine
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ pagination_prev: null
[**Model contracts**](model-contracts): Guarantee the shape of a model while it is building to avoid surprises or breaking changes for downstream queries. Explicitly define column names, data types, and constraints (as supported by your data platform).

[**Model versions**](model-versions): When a breaking change is unavoidable, provide a smoother upgrade pathway by creating a new version of the model. These model versions share a common reference name and can reuse properties & configurations.

[**Project dependencies**](/docs/collaborate/govern/project-dependencies): Use cross project dependencies to reference public models across dbt projects using the [two-argument ref](/reference/dbt-jinja-functions/ref#ref-project-specific-models), which includes the project name.

0 comments on commit ea9f88b

Please sign in to comment.