toucan-connectors
toucan-connectors copied to clipboard
Deprecate %s(..) parameter syntax in favor of Jinja
We actually support two syntax for variables that should be substituted in queries. This is probably one too much :p I suggest keeping Jinja only for clarity.
See this code where we already replace the param syntax by jinja: https://github.com/ToucanToco/toucan-connectors/pull/299/files#diff-0f79225d8a2288bbc6507d1647f4e5594e61b8284ca99c89759d678d7f3d3e87R79
Points to take into consideration :
The syntaxes used in connectors out of our own implementation with Jinka is the one described here https://www.python.org/dev/peps/pep-0249/#paramstyle . It's what you'd find if you check the documentation of some connectors. (For instance, in Snowflake Connector, you find the pep 249 syntaxes described).
Otherwise using jinja syntax offers the advantage of being able to use nested params + we could have only one way of applying parameters.