Skip to content

Commit

Permalink
Merge pull request #149 from JoeryV/fix-bug-window-time-grain-day
Browse files Browse the repository at this point in the history
fix issue #146 - using the metric window functionality with time_grain='day'
  • Loading branch information
callum-mcdata authored Oct 26, 2022
2 parents 7a48cc1 + 0046436 commit d5e6b5e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
7 changes: 7 additions & 0 deletions .changes/unreleased/Fixes-20221025-164009.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Fixes
body: Fixing bug with window functionality
time: 2022-10-25T16:40:09.927002+01:00
custom:
Author: JoeryV
Issue: "146"
PR: "149"
8 changes: 0 additions & 8 deletions macros/sql_gen/gen_base_query.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
calendar_table.date_{{ grain }} as date_{{grain}},
{% endif -%}

{% if grain != 'day' %}
calendar_table.date_day as window_filter_date,
{% endif %}

{% if secondary_calculations | length > 0 -%}
{%- for period in relevant_periods %}
Expand Down Expand Up @@ -91,9 +89,7 @@
calendar_table.date_{{ grain }} as date_{{grain}},
{% endif -%}

{% if grain != 'day' %}
calendar_table.date_day as window_filter_date,
{% endif %}

{% if secondary_calculations | length > 0 -%}
{%- for period in relevant_periods %}
Expand Down Expand Up @@ -168,9 +164,7 @@
calendar_table.date_{{ grain }} as date_{{grain}},
{% endif -%}

{% if grain != 'day' %}
calendar_table.date_day as window_filter_date,
{% endif %}

{% if secondary_calculations | length > 0 -%}
{%- for period in relevant_periods %}
Expand Down Expand Up @@ -242,9 +236,7 @@
calendar_table.date_{{ grain }} as date_{{grain}},
{% endif -%}

{% if grain != 'day' %}
calendar_table.date_day as window_filter_date,
{% endif %}

{% if secondary_calculations | length > 0 -%}
{%- for period in relevant_periods %}
Expand Down

0 comments on commit d5e6b5e

Please sign in to comment.