Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for old versions of jinja #71

Merged
merged 1 commit into from
Jun 27, 2018
Merged

fix for old versions of jinja #71

merged 1 commit into from
Jun 27, 2018

Conversation

drewbanin
Copy link
Contributor

The in filter was added to jinja in v2.10.0, but dbt currently has a requirement on jina >= 2.8. Some folks might not have installed dbt for a while, and jinja can fail hard with this error when the in filter is used:

Compilation Error in macro unknown (materializations/insert_by_period_materialization.sql)
  no test named 'in'
    line 51
      {%- if not '__PERIOD_FILTER__' is in sql -%}

This PR uses the built-in .find method on Python strings to avoid using partially supported jinja functionality.

@drewbanin drewbanin merged commit c51d19a into master Jun 27, 2018
@drewbanin drewbanin deleted the fix/remove-in-filter branch June 27, 2018 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant