[sqlfluff]
dialect = postgres
templater = jinja
max_line_length = 120
library_path = sqlfluff_libs
# AM04: ambiguous column count in a SELECT * (n/a, we always name columns).
# LT02/LT03/LT05/LT14/CV06/CV07/CP01: pure layout/formatting rules that
# fight the compact-but-valid whitespace real Jinja for-loops produce
# (e.g. a comma-joined column list rendered on one line). These templates'
# actual SQL correctness is verified empirically by the test suite
# executing every one of them against real Postgres, not by sqlfluff.
exclude_rules = AM04, LT02, LT03, LT05, LT14, CV06, CV07, CP01

[sqlfluff:templater:jinja:context]
tenant_schema = public
view_name = person_view
base_table = person
function_name = person_view_instead_of_update
pk_column = id
pk_default_expr = nextval('"public"."person_id_seq"')
columns = ["id", "first_name", "age"]
trigger_name = overlayfk_note_person_id
referencing_table = note
column = person_id
table_name = note
negate = True
source = {"schema": "public", "table": "personsource", "id_column": "id", "extra_where": "", "negate": True}
target_tables = [{"schema": "public", "table": "person", "id_column": "id", "negate": False}, {"schema": "public", "table": "personsource", "id_column": "id", "negate": True}]
