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
Thanks for creating and maintaining this great package! It was precisely what I was looking for when I first discovered 'Jinja-like' SQL and hoped to implement its capabilities within the sqltargets package.
I have an open pull request to add jinjar and it's passed some basic tests and checks. Before I merge, however, I would welcome your expertise on how to make the most of jinjar and how to implement it correctly. No worries if you're too busy, I still wanted to take the opportunity to thank you for this package.
The text was updated successfully, but these errors were encountered:
Hi @daranzolin, Thanks for your interest in jinjar - I'm so glad to hear you've found it helpful!
I took a quick look at your PR and have a couple of comments:
Query parameters are passed to jinjar::render() as a single named list object params. As a result, template variables require a namespace. For example, {{ params.payment_methods }} instead of {{ payment_methods }}. If this was unintentional, you should be able to use the slice operator to access the parameters directly.
Jinjar and Jinja support different template syntax (jinjar is powered by the inja library), though I've tried to match things as closely as I can. This means an existing Jinja template might need some edits before it'll work with jinjar. I'd ask that you reflect this difference in your documentation (perhaps with a link to this vignette), to avoid confusion and frustration.
I initially tried to pass dots ... all the way to jinjar_render() via tar_sql() but was running into problems. I eventually settled on paramsto mimic how params are utilized in Quarto. Still thinking about this.
I will be sure to link to the above vignette, I've already referenced it several times in my own work.
Hi David,
Thanks for creating and maintaining this great package! It was precisely what I was looking for when I first discovered 'Jinja-like' SQL and hoped to implement its capabilities within the sqltargets package.
I have an open pull request to add jinjar and it's passed some basic tests and checks. Before I merge, however, I would welcome your expertise on how to make the most of jinjar and how to implement it correctly. No worries if you're too busy, I still wanted to take the opportunity to thank you for this package.
The text was updated successfully, but these errors were encountered: