dbt-sqlserver
dbt-sqlserver copied to clipboard
Encountered unknown tag 'break'.
Discussed in https://github.com/dbt-msft/dbt-sqlserver/discussions/405
Originally posted by RichardHallgren May 24, 2023 Hello! I'm running into a problem with dbt-sqlserver or possible dbt-core that I can't really understand:
09:11:32.264354 [info ] [MainThread]: Running with dbt=1.4.3
09:11:32.267246 [debug] [MainThread]: running dbt with arguments {'debug': True, 'log_format': 'default', 'write_json': True, 'use_colors': True, 'printer_width': 1000, 'version_check': True, 'partial_parse': False, 'static_parser': True, 'profiles_dir': 'removed file path', 'send_anonymous_usage_stats': False, 'fail_fast': True, 'quiet': False, 'no_print': False, 'cache_selected_only': False, 'indirect_selection': 'eager', 'resource_types': [], 'which': 'build', 'rpc_method': 'build'}
09:11:32.268247 [debug] [MainThread]: Tracking: do not track
09:11:32.284542 [debug] [MainThread]: checksum: c7a5cda64f02d8b9dd20ef412f82fbb79fdce1bb359c3c5dae3d080de7f31bfd, vars: {}, profile: None, target: None, version: 1.4.3
09:11:32.290461 [debug] [MainThread]: Partial parsing not enabled
09:11:32.563232 [debug] [MainThread]: Flushing usage events
09:11:32.564247 [error] [MainThread]: Encountered an error:
Compilation Error
Encountered unknown tag 'break'. Jinja was looking for the following tags: 'elif' or 'else' or 'endif'. The innermost block that needs to be closed is 'if'.
line 20
{%- break -%}
I haven't written any custom macros myself using Jinja and I can't understand where this break tag exists. I've tried searching in the repo here in github for the break-tag but I can't find it and I don't know where it actually exists.
What could be wrong? Where can this {%- break -%}
tag be?
I've pasted the version of each of the packages in my environment. Below are the dbt-
packages, but here's a Gist to the entire pip env
Package Version
------------------------ --------
dbt-core 1.4.3
dbt-extractor 0.4.1
dbt-sqlserver 1.4.3
In another environment the project does run without issue
Below are the dbt-
packages, but here's a Gist to the entire pip env. Click here for the diff between the two environments.
Package Version
------------------------ --------
dbt-core 1.3.1
dbt-extractor 0.4.1
dbt-sqlserver 1.3.1
@RichardHallgren, I agree that you're seeing is strange.
I diffed your environments, the culprit I suspect is the difference of versions of dbt-core
and dbt-sqlserver