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

Add SQL support #41

Closed
wants to merge 2 commits into from
Closed

Add SQL support #41

wants to merge 2 commits into from

Conversation

clrcrl
Copy link

@clrcrl clrcrl commented Oct 8, 2018

I use Jinja in my SQL when using open source tool dbt, so have been using a version of this package for my highlighting.

One thing that I'm stuck on is getting Jinja highlighting to work within round braces (()), for example, the Jinja in the common table expression does not get highlighted:

with order_payments as (
  select
  order_id
  {% for payment_method in payment_methods -%}
  , sum(case when payment_method = '{{payment_method}}' then amount else 0 end) as {{payment_method}}_amount
  {% endfor -%}
  from {{ ref('base_payments') }}
  group by 1
)
select
*
from order_payments

I suspect that this line is the culprit – any ideas on how to get around it?

@clrcrl
Copy link
Author

clrcrl commented Oct 8, 2018

Never mind, just saw #37 and #33

@clrcrl clrcrl closed this Oct 8, 2018
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