Skip to content
Advertisement

How to add a Jinja function to .sqlfluff config

I’m using the jinja functions run_query and execute. https://docs.getdbt.com/reference/dbt-jinja-functions/run_query

But when sqlfluff lint I get the following error: Undefined jinja template variable: ‘run_query’

I’m trying to add it to the .sqlfluff config but there doesn’t seem to be any guidance anywhere on how to add this to the config file.

Any help would be greatly appreciated! Thanks

Advertisement

Answer

Add templater=dbt in your .sqlfluff config file.

More info here.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement