We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug sqlfmt error with jinja syntax for start and endcall that used to parse previously (in v0.13.0)
Similar to issue #335
To Reproduce Run sql-fmt on the following code from https://github.com/EqualExperts/dbt-unit-testing#different-ways-to-build-mock-values:
{% call dbt_unit_testing.test('customers', 'should sum order values to calculate customer_lifetime_value') %} {% call dbt_unit_testing.mock_ref ('stg_customers', {"input_format": "csv"}) %} customer_id, first_name, last_name 1,'','' {% endcall %} {% call dbt_unit_testing.mock_ref ('stg_orders', {"input_format": "csv"}) %} order_id,customer_id,order_date 1001,1,null 1002,1,null {% endcall %} {% call dbt_unit_testing.mock_ref ('stg_payments', {"input_format": "csv"}) %} order_id,amount 1001,10 1002,10 {% endcall %} {% call dbt_unit_testing.expect({"input_format": "csv"}) %} customer_id,customer_lifetime_value 1,20 {% endcall %} {% endcall %}
Expected behavior Should not fail to parse
Actual behavior
sqlfmt encountered an error: Encountered closing bracket '{% endcall %}' at position xxx, before matching opening bracket. Context: {% endcall %}
Additional context Version v0.14.0 appears to break this and the fix in v0.14.1 did not resolve it
The text was updated successfully, but these errors were encountered:
Yeah, this makes sense. I didn't know call blocks could be nested. Fix for this will be a little more involved but I'll prioritize it
call
Sorry, something went wrong.
@AndrewLane this is fixed in the most recent commit. I'll release this as 0.14.2 later today
I tried it out and it works great. Thanks!
Successfully merging a pull request may close this issue.
Describe the bug
sqlfmt error with jinja syntax for start and endcall that used to parse previously (in v0.13.0)
Similar to issue #335
To Reproduce
Run sql-fmt on the following code from https://github.com/EqualExperts/dbt-unit-testing#different-ways-to-build-mock-values:
Expected behavior
Should not fail to parse
Actual behavior
Additional context
Version v0.14.0 appears to break this and the fix in v0.14.1 did not resolve it
The text was updated successfully, but these errors were encountered: