Skip to content

Commit

Permalink
DO NOT MERGE UNTIL NOV 1. 1.6 removal from docs
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewshaver committed Oct 28, 2024
1 parent 42beca2 commit 92d5ea6
Show file tree
Hide file tree
Showing 28 changed files with 6 additions and 644 deletions.
2 changes: 1 addition & 1 deletion contributing/single-sourcing-content.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ This component can be added directly to a markdown file in a similar way as othe
Both properties can be used together to set a range where the content should show. In the example below, this content will only show if the selected version is between **0.21** and **1.0**:

```markdown
<VersionBlock lastVersion="1.6">
<VersionBlock lastVersion="1.9">

Versioned content here

Expand Down
134 changes: 1 addition & 133 deletions website/dbt-versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ exports.versions = [
},
{
version: "1.7",
EOLDate: "2024-10-30",
},
{
version: "1.6",
EOLDate: "2024-07-31",
EOLDate: "2024-11-01",
},
];

Expand Down Expand Up @@ -66,134 +62,6 @@ exports.versionedPages = [
page: "reference/global-configs/indirect-selection",
firstVersion: "1.8",
},
{
page: "reference/resource-configs/store_failures_as",
firstVersion: "1.7",
},
{
page: "docs/build/build-metrics-intro",
firstVersion: "1.6",
},
{
page: "docs/build/sl-getting-started",
firstVersion: "1.6",
},
{
page: "docs/build/about-metricflow",
firstVersion: "1.6",
},
{
page: "docs/build/join-logic",
firstVersion: "1.6",
},
{
page: "docs/build/validation",
firstVersion: "1.6",
},
{
page: "docs/build/semantic-models",
firstVersion: "1.6",
},
{
page: "docs/build/group-by",
firstVersion: "1.6",
},
{
page: "docs/build/entities",
firstVersion: "1.6",
},
{
page: "docs/build/metrics-overview",
firstVersion: "1.6",
},
{
page: "docs/build/cumulative",
firstVersion: "1.6",
},
{
page: "docs/build/derived",
firstVersion: "1.6",
},
{
page: "docs/build/measure-proxy",
firstVersion: "1.6",
},
{
page: "docs/build/ratio",
firstVersion: "1.6",
},
{
page: "reference/commands/clone",
firstVersion: "1.6",
},
{
page: "docs/collaborate/govern/project-dependencies",
firstVersion: "1.6",
},
{
page: "reference/dbt-jinja-functions/thread_id",
firstVersion: "1.6",
},
{
page: "reference/resource-properties/deprecation_date",
firstVersion: "1.6",
},
{
page: "reference/commands/retry",
firstVersion: "1.6",
},
{
page: "docs/build/groups",
firstVersion: "1.5",
},
{
page: "docs/collaborate/govern/model-contracts",
firstVersion: "1.5",
},
{
page: "reference/commands/show",
firstVersion: "1.5",
},
{
page: "docs/collaborate/govern/model-access",
firstVersion: "1.5",
},
{
page: "docs/collaborate/govern/model-versions",
firstVersion: "1.5",
},
{
page: "reference/programmatic-invocations",
firstVersion: "1.5",
},
{
page: "reference/resource-configs/contract",
firstVersion: "1.5",
},
{
page: "reference/resource-configs/group",
firstVersion: "1.5",
},
{
page: "reference/resource-properties/access",
firstVersion: "1.5",
},
{
page: "reference/resource-properties/constraints",
firstVersion: "1.5",
},
{
page: "reference/resource-properties/latest_version",
firstVersion: "1.5",
},
{
page: "reference/resource-properties/versions",
firstVersion: "1.5",
},
{
page: "reference/resource-configs/on_configuration_change",
firstVersion: "1.6",
},
];

/**
Expand Down
139 changes: 0 additions & 139 deletions website/docs/docs/build/metricflow-time-spine.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,42 +124,6 @@ For an example project, refer to our [Jaffle shop](https://github.com/dbt-labs/j

<File name="metricflow_time_spine.sql">

<VersionBlock lastVersion="1.6">

```sql
{{
config(
materialized = 'table',
)
}}
with days as (
{{
dbt_utils.date_spine(
'day',
"to_date('01/01/2000','mm/dd/yyyy')",
"to_date('01/01/2025','mm/dd/yyyy')"
)
}}
),
final as (
select cast(date_day as date) as date_day
from days
)
select * from final
-- filter the time spine to a specific range
where date_day > dateadd(year, -4, current_timestamp())
and date_hour < dateadd(day, 30, current_timestamp())
```

</VersionBlock>

<VersionBlock firstVersion="1.7">

```sql
{{
config(
Expand Down Expand Up @@ -189,42 +153,9 @@ where date_day > dateadd(year, -4, current_timestamp())
and date_hour < dateadd(day, 30, current_timestamp())
```

</VersionBlock>

### Daily (BigQuery)

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
{{config(materialized='table')}}
with days as (
{{dbt_utils.date_spine(
'day',
"DATE(2000,01,01)",
"DATE(2025,01,01)"
)
}}
),
final as (
select cast(date_day as date) as date_day
from days
)
select *
from final
-- filter the time spine to a specific range
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">

Expand Down Expand Up @@ -253,7 +184,6 @@ and date_hour < dateadd(day, 30, current_timestamp())
```

</File>
</VersionBlock>

</File>

Expand Down Expand Up @@ -306,42 +236,6 @@ To create this table, you need to create a model in your dbt project called `met

### Daily

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

```sql
{{
config(
materialized = 'table',
)
}}
with days as (
{{
dbt_utils.date_spine(
'day',
"to_date('01/01/2000','mm/dd/yyyy')",
"to_date('01/01/2025','mm/dd/yyyy')"
)
}}
),
final as (
select cast(date_day as date) as date_day
from days
)
select * from final
-- filter the time spine to a specific range
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'>


Expand Down Expand Up @@ -375,43 +269,11 @@ and date_hour < dateadd(day, 30, current_timestamp())
```

</File>
</VersionBlock>

### Daily (BigQuery)

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
{{config(materialized='table')}}
with days as (
{{dbt_utils.date_spine(
'day',
"DATE(2000,01,01)",
"DATE(2025,01,01)"
)
}}
),
final as (
select cast(date_day as date) as date_day
from days
)
select *
from final
-- filter the time spine to a specific range
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
Expand All @@ -438,7 +300,6 @@ and date_hour < dateadd(day, 30, current_timestamp())
```

</File>
</VersionBlock>

You only need to include the `date_day` column in the table. MetricFlow can handle broader levels of detail, but finer grains are only supported in versions 1.9 and higher.

Expand Down
Loading

0 comments on commit 92d5ea6

Please sign in to comment.