Python templater¶
Uses native Python f-strings. As described in Generic Variable Templating, an example usage would look be configured as follows:
If passed the following .sql file:
SELECT * FROM {tbl_name}
…and the following configuration in .sqlfluff in the same directory:
[sqlfluff]
templater = python
[sqlfluff:templater:python:context]
tbl_name = my_table
…then before parsing, the sql will be transformed to:
SELECT * FROM my_table