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

Deprecate %s(..) parameter syntax in favor of Jinja #303

Open
davinov opened this issue Jan 20, 2021 · 1 comment
Open

Deprecate %s(..) parameter syntax in favor of Jinja #303

davinov opened this issue Jan 20, 2021 · 1 comment

Comments

@davinov
Copy link
Member

davinov commented Jan 20, 2021

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

@hachichaud
Copy link
Contributor

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.

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

No branches or pull requests

2 participants