Originally created by: grynn-in
dim_select(), dim_select_from_source() and dim_group_by() emit nothing when the dimension list is empty. 40 of their 48 call sites carry a trailing comma:
{{ dim_select(prefix='tb.') }},
With zero dimensions that leaves a dangling comma in the SELECT or GROUP BY list, and the model fails to compile. A site that declares no dimensions cannot build.
konsol has decided (Deepak Pai, 17 September 2026 — konsol#230) that konsol ships no Dimensions and each site declares its own. The shipped dim_business_unit, dim_department and dim_cost_center encoded one customer's vocabulary, were all unused, and could not be retired.
A fresh site therefore starts with zero dimensions, which is exactly the case these macros cannot compile.
Move the separator inside the macro so the empty case is empty rather than malformed:
Mechanical, but 40 edits across the model tree.
dbt parse will not catch a regression here — the project's notes record that it does not validate SQL. This needs a build against an empty dimension list, ideally as a CI target once konsolidat#181 lands. Without that, the next person to touch these macros reintroduces it silently.
Set dimensions: [] in dbt_project.yml and build any model calling dim_select() — for example gold_consolidated_trial_balance or silver_gl_entries.