question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow .sql.jinja file extension.

See original GitHub issue

Describe the feature

Provide the option to allow *.sql.jinja files as alternative to *.sql in all places where DBT uses jinja in SQL (I believe that is all places excluding the target folder).

This allows users to easily configure their IDE to handle both plain sql files as well as dbt sql(.jinja) files as intended. Currently (at least with pycharm) I have to choose between having all sql files interpreted as jinja or as plain sql.

Describe alternatives you’ve considered

I’ve looked into options to only apply jinja interpretation to the dbt/ part of my project via my IDE but that is not possible. Not only that I’d prefer a configuration that would have the IDE interpret files properly by default, or at least irregardless of project-specific configuration. This one simple change would ensure that.

Who will this benefit?

Everybody 😉

Are you interested in contributing this feature?

Sure

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
jtcohen6commented, Sep 7, 2022

Going to reopen this one, given renewed interest

1reaction
jtcohen6commented, Feb 2, 2022

@Luttik You’re totally right. I’m going to start using help_needed in place of good_first_issue when something:

  • Is tricky to implement (but possible, we think, with a clear place to start)
  • Depends on community initiative/contribution (we aren’t able to prioritize it ourselves)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Allow .sql.jinja file extension. · dbt-labs/dbt-core@e3452b9
dbt enables data analysts and engineers to transform their data using the same practices that software engineers use to build applications. - Allow...
Read more >
Enabling Jinja syntax support in SQL files in PyCharm
Select “Jinja2” for the Template Language dropdown at the top,; Click on the “+” icon to add SQL (and YAML) to the list....
Read more >
Jinja + SQL = ❤️. Macros for maintainable, testable data…
SQL allows you to nest logic (even recursively) in subqueries or common table expressions, letting you link one set of records to another...
Read more >
Jinja the SQL way of the Ninja - Medium
Jinja templates are a powerful tool to generate dynamic SQL queries. It can enable code re-use, legibility, and a clearer separation of concern...
Read more >
Is there an idiomatic file extension for Jinja templates?
A Jinja template doesn't need to have a specific extension: .html, .xml, or any other extension is just fine. But what should I...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found