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
The Python formatter to use f-strings like {table} in SQL is now mentioned in the docs but apparently still not well supported:
Note: This templater currently does not work by default in the CLI and needs custom set up to work.
So what kind of custom set up is needed to make it work? Just setting templater = python obviously does not work but even with a config like this I have issues and lots of formatting gets messed up:
I tried different variants of the regex like {{(?P<param_name>[\w_]+)}}, {(?P<param_name>[\w_]+)}, \{\{(?P<param_name>[\w_]+)\}\}, \{(?P<param_name>[\w_]+)\}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The Python formatter to use f-strings like
{table}
in SQL is now mentioned in the docs but apparently still not well supported:So what kind of custom set up is needed to make it work? Just setting
templater = python
obviously does not work but even with a config like this I have issues and lots of formatting gets messed up:I tried different variants of the regex like
{{(?P<param_name>[\w_]+)}}
,{(?P<param_name>[\w_]+)}
,\{\{(?P<param_name>[\w_]+)\}\}
,\{(?P<param_name>[\w_]+)\}
Beta Was this translation helpful? Give feedback.
All reactions