> ## Documentation Index
> Fetch the complete documentation index at: https://offthepace.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# dbt Macros

> Auto-generated reference for all 25 project macros.

Auto-generated reference for all 25 project macros.

| Macro | Description |
| - | - |
| [`assert_additive_identity`](/reference/macros/assert_additive_identity) | Validates that an additive identity holds: total = sum(components) + residual ± tolerance |
| [`bayesian_shrinkage`](/reference/macros/bayesian_shrinkage) | Computes Bayesian shrinkage estimate from observed data and prior. |
| [`circuit_id_from_name`](/reference/macros/circuit_id_from_name) | Derive a stable physical-circuit identifier from a circuit's display name. |
| [`clamp_or_null`](/reference/macros/clamp_or_null) | |
| [`clean_lap_filter`](/reference/macros/clean_lap_filter) | Reusable WHERE clause predicate for filtering to "clean" laps suitable for driver skill extraction. |
| [`cliff_plateau_s`](/reference/macros/cliff_plateau_s) | |
| [`cliff_ramp_frac`](/reference/macros/cliff_ramp_frac) | |
| [`cliff_ramp_slope_s_per_lap`](/reference/macros/cliff_ramp_slope_s_per_lap) | |
| [`cliff_severity_gain`](/reference/macros/cliff_severity_gain) | |
| [`cliff_severity_span`](/reference/macros/cliff_severity_span) | |
| [`cliff_severity_term`](/reference/macros/cliff_severity_term) | |
| [`compound_cliff_wear_s`](/reference/macros/compound_cliff_wear_s) | |
| [`driver_isolation_identity_terms`](/reference/macros/driver_isolation_identity_terms) | The cumulative-identity split of tier 3, aggregated over any group of fct\_driver\_isolation\_pair\_lap rows (WI-16a). |
| [`driver_isolation_pure_season_offset`](/reference/macros/driver_isolation_pure_season_offset) | |
| [`driver_isolation_reliability`](/reference/macros/driver_isolation_reliability) | The confidence columns every driver-isolation rating carries (WI-16a), at any grain. |
| [`fuel_regulatory_max_kg`](/reference/macros/fuel_regulatory_max_kg) | |
| [`normal_cdf`](/reference/macros/normal_cdf) | Standard normal CDF Phi(x). |
| [`normalize_compound`](/reference/macros/normalize_compound) | Maps Pirelli's 2018-era legacy compound names onto the modern SOFT/MEDIUM/HARD taxonomy so that compound-parameter joins (dim\_compounds\_season) land for 2018. |
| [`posterior_variance`](/reference/macros/posterior_variance) | Computes posterior variance from normal-normal conjugate model. |
| [`power_law_beta_grid`](/reference/macros/power_law_beta_grid) | WI-17: the beta grid both power-law fits profile over, 0. |
| [`trailing_median`](/reference/macros/trailing_median) | Median of `value_col` over observations STRICTLY BEFORE the current row. |
| [`trailing_observation_count`](/reference/macros/trailing_observation_count) | How many valid observations the matching trailing\_median() actually saw. |
| [`trailing_sum`](/reference/macros/trailing_sum) | Sum of `value_col` over observations STRICTLY BEFORE the current row. |
| [`trailing_value_expr`](/reference/macros/trailing_value_expr) | The value a trailing window aggregates: `value_col`, masked to NULL where the row is not a valid observation. |
| [`trailing_window_frame`](/reference/macros/trailing_window_frame) | Builds the OVER(. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.