Skip to content

Commit c51d19a

Browse files
authored
Merge pull request #71 from fishtown-analytics/fix/remove-in-filter
fix for old versions of jinja
2 parents 754db12 + bfe79d3 commit c51d19a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ Usage:
285285
period = "day",
286286
timestamp_field = "created_at",
287287
start_date = "2018-01-01",
288-
stop_date = "2018-06-01"
288+
stop_date = "2018-06-01")
289289
}}
290290

291291
with events as (

macros/materializations/insert_by_period_materialization.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
{%- set stop_date = config.get('stop_date') or '' -%}}
4949
{%- set period = config.get('period') or 'week' -%}
5050

51-
{%- if not '__PERIOD_FILTER__' is in sql -%}
51+
{%- if sql.find('__PERIOD_FILTER__') == -1 -%}
5252
{%- set error_message -%}
5353
Model '{{ model.unique_id }}' does not include the required string '__PERIOD_FILTER__' in its sql
5454
{%- endset -%}

0 commit comments

Comments
 (0)