From cb12b636f5506b0166c7a9563dfeeff2f58535ee Mon Sep 17 00:00:00 2001 From: Aeriel Soriano <27873562+aerielsoriano@users.noreply.github.com> Date: Tue, 26 Nov 2024 04:28:02 +0000 Subject: [PATCH] Update metricflow-time-spine.md (#6539) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated the WHERE clause for the BigQuery Daily code block. It throws an error when using the original suggestion. ## What are you changing in this pull request and why? ## Checklist - [ ] I have reviewed the [Content style guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md) so my content adheres to these guidelines. - [ ] The topic I'm writing about is for specific dbt version(s) and I have versioned it according to the [version a whole page](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version) and/or [version a block of content](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-blocks-of-content) guidelines. - [ ] I have added checklist item(s) to this list for anything anything that needs to happen before this PR is merged, such as "needs technical review" or "change base branch." - [ ] The content in this PR requires a dbt release note, so I added one to the [release notes page](https://docs.getdbt.com/docs/dbt-versions/dbt-cloud-release-notes). --- 🚀 Deployment available! Here are the direct links to the updated files: - https://docs-getdbt-com-git-aerielsoriano-patch-1-dbt-labs.vercel.app/docs/build/metricflow-time-spine --- website/docs/docs/build/metricflow-time-spine.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/docs/build/metricflow-time-spine.md b/website/docs/docs/build/metricflow-time-spine.md index 5f16af38023..48e46caeec2 100644 --- a/website/docs/docs/build/metricflow-time-spine.md +++ b/website/docs/docs/build/metricflow-time-spine.md @@ -179,8 +179,8 @@ final as ( select * from final -- filter the time spine to a specific range -where date_day > dateadd(year, -4, current_timestamp()) -and date_day < dateadd(day, 30, current_timestamp()) +where date_day > date_add(DATE(current_timestamp()), INTERVAL -4 YEAR) +and date_day < date_add(DATE(current_timestamp()), INTERVAL 30 DAY) ```