You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Developing in DBT means writing in a combination of database-specific SQL dialect and jinja2. At least, VSCode with Better Jinja plugin is able to help with prompts and check syntaxis of both languages simultaneously - iff model file extension is .sql.j2. However, dbt does not recognise such files as model.
Suggestion:
make dbt run [-m] work agnostic of anything after .sql extension suffix
The text was updated successfully, but these errors were encountered:
@Gregory108 Thanks for the issue! We've got a very similar one open: #3484, which is in progress in #3498.
The Jinja folks have thrown their weight behind the .jinja file extension, though I understand that .j2 is also a popular choice (docs, stackoverflow conversation).
Personally, I don't have strong feelings about preferring .jinja vs. .j2. I suppose we could support any arbitrary suffix after .sql. dbt does name models based on their file names, and it support dots in model file names today, so I think a model file named models/my.sql.model.sql.j2 would do some surprising things. I think we'd need to consider that an unreasonable edge case, and one we can't hope to support.
In the meantime, I'm going to close this as a duplicate of #3484, which will be doing the heavy lifting. I'd encourage you to leave a comment there if you feel strongly about supporting .sql.j2 in particular (or other extensions in general), in addition to .sql.jinja.
Developing in DBT means writing in a combination of database-specific SQL dialect and jinja2. At least, VSCode with Better Jinja plugin is able to help with prompts and check syntaxis of both languages simultaneously - iff model file extension is .sql.j2. However, dbt does not recognise such files as model.
Suggestion:
dbt run [-m]
work agnostic of anything after .sql extension suffixThe text was updated successfully, but these errors were encountered: