Add week_number_academic_year and is_week_ytd to OKRTS referrals#3491
Add week_number_academic_year and is_week_ytd to OKRTS referrals#3491anthonygwalters wants to merge 5 commits intomainfrom
Conversation
Passes week_number_academic_year from int_powerschool__calendar_week (already selected in int_extracts__student_enrollments_weeks) through to rpt_tableau__okrts_referrals, enabling clean YoY BAN calculations in Tableau by filtering to a consistent academic week cutoff across years. Also documents the column in int_extracts__student_enrollments_weeks.yml where it was previously selected but undocumented. https://claude.ai/code/session_015Z6wMSceyyfCNnsdK2nCL9
…eferrals Pre-computes YoY as-of-current-week alignment in dbt so Tableau BANs only need to filter on is_week_ytd = true rather than doing date math or using a parameter. Also surfaces is_current_week_mon_sun for flagging the current/latest week row. https://claude.ai/code/session_015Z6wMSceyyfCNnsdK2nCL9
|
Claude finished @anthonygwalters's task in 2m 18s —— View job Code Review
|
…laude/optimize-referrals-yoy-Qp158
Per SQL column ordering convention, plain column refs must precede window functions and CASE statements. Moves is_current_week_mon_sun from after referral_tier to the week columns block, and updates the YAML to match. https://claude.ai/code/session_015Z6wMSceyyfCNnsdK2nCL9

Pull Request
Summary & Motivation
When merged, this pull request will add two new columns to the OKRTS referrals Tableau extract:
week_number_academic_year— The week number within the academic year, exposed from the underlyingint_extracts__student_enrollments_weeksmodelis_current_week_mon_sun— A boolean flag indicating the current week (Monday-Sunday)is_week_ytd— A boolean flag indicating whether a week falls within the year-to-date range for the current academic yearThese additions enable more granular time-based filtering and analysis in Tableau dashboards, particularly for tracking referrals by week within the academic year.
Self-review
dbt
rpt_tableau__okrts_referrals.ymlproperties file with new column definitionsint_extracts__student_enrollments_weeks.ymlto document theweek_number_academic_yearcolumnCI checks
https://claude.ai/code/session_015Z6wMSceyyfCNnsdK2nCL9