Commit f6e4e9b
fix(reporting): fix program_completion_days sign and consolidate with reporting model
marts__combined_program_enrollment_detail computed program_completion_days as
start-minus-certificate (negative). program_enrollment_with_user_report
independently re-derived the same metric as program_complete_days with the
correct direction but re-parsed from the raw certificate timestamp string
instead of consuming the mart's field, creating two competing definitions.
Swap the date_diff operands in the mart to certificate-minus-start (positive,
matching both models' documented description), and have the reporting model
select enrollment_detail.program_completion_days directly instead of
re-deriving it from a differently-filtered join.
Part of #2375 (2026-07 dbt warehouse audit). Witan task: tk-reconcile-fifth-competing-metric-definition-prog-3160aa.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 50733ae commit f6e4e9b
2 files changed
Lines changed: 2 additions & 12 deletions
File tree
- src/ol_dbt/models
- marts/combined
- reporting
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
364 | | - | |
365 | 364 | | |
| 365 | + | |
366 | 366 | | |
367 | 367 | | |
Lines changed: 1 addition & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | 36 | | |
43 | 37 | | |
44 | 38 | | |
| |||
97 | 91 | | |
98 | 92 | | |
99 | 93 | | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
| 94 | + | |
105 | 95 | | |
106 | 96 | | |
107 | 97 | | |
| |||
0 commit comments