[Compatibility] Whitespace Errors while compiling int_zendesk__field_history_scd
#105
Open
2 of 4 tasks
Labels
priority:p4
Affects few users; pick up when available
status:in_review
Currently in review
type:enhancement
New functionality or enhancement
update_type:models
Primary focus requires model updates
Is there an existing issue for this?
Describe the issue
The
int_zendesk__field_history_scd
model file contains an interesting pattern at the top of the model:--
){%- -%}
)with
statement.Jinja whitespace parsing can cause unexpected issues when compiling to SQL. While this pattern appears to work as expected with dbt's current parsing engine, I've been testing an alternative parsing tool and am finding that the whitespace parsing is leading to the surprising result where the last word of the comment from (1) is being concatenated with the
with
from (4) resulting invalueswith
which obviously causes the sql to fail.Relevant error log or model output
No response
Expected behavior
While I understand that the team's objective is to build for today's dbt and not other parsing engines, I would still expect to avoid problematic jinja patterns, especially those that result from cosmetic choices like whitespace management. Simply flipping the
set
command to use{% %}
instead should allow all jinja parsers to handle the script successfully.dbt Project configurations
n/a
Package versions
latest:
What database are you using dbt with?
bigquery
dbt Version
Core:
Your version of dbt-core is out of date!
You can find instructions for upgrading here:
https://docs.getdbt.com/docs/installation
Plugins:
Additional Context
No response
Are you willing to open a PR to help address this issue?
The text was updated successfully, but these errors were encountered: