Skip to content

Commit

Permalink
Update metricflow-time-spine.md (#6000)
Browse files Browse the repository at this point in the history
fix file name position
  • Loading branch information
mirnawong1 authored Sep 2, 2024
1 parent fb636f1 commit 51e2108
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions website/docs/docs/build/metricflow-time-spine.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ The example creates a time spine at a daily grain and an hourly grain. A few thi
* You can add a time spine for each granularity you intend to use if query efficiency is more important to you than configuration time, or storage constraints. For most engines, the query performance difference should be minimal and transforming your time spine to a coarser grain at query time shouldn't add significant overhead to your queries.
* We recommend having a time spine at the finest grain used in any of your dimensions to avoid unexpected errors. i.e., if you have dimensions at an hourly grain, you should have a time spine at an hourly grain.

<VersionBlock lastVersion="1.6">
<File name="metricflow_time_spine.sql">

<File name='time_spine_daily.sql'>
<VersionBlock lastVersion="1.6">

```sql
{{
Expand Down Expand Up @@ -80,14 +80,11 @@ select * 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
{{
config(
Expand Down Expand Up @@ -116,15 +113,9 @@ select * from final
where date_day > dateadd(year, -4, current_timestamp())
and date_hour < dateadd(day, 30, current_timestamp())
```
</File>

</VersionBlock>

</File>

<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
Expand All @@ -149,13 +140,10 @@ 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
Expand All @@ -180,9 +168,8 @@ from final
where date_day > dateadd(year, -4, current_timestamp())
and date_hour < dateadd(day, 30, current_timestamp())
```
</File>

</VersionBlock>
</File>

## Hourly time spine
<File name='time_spine_hourly.sql'>
Expand Down

0 comments on commit 51e2108

Please sign in to comment.