Skip to content

Commit

Permalink
fix annualized grouping in wide sch networks (#146)
Browse files Browse the repository at this point in the history
* Update bld_ef3__wide_school_network_assoc.sql

* Update CHANGELOG.md

* bump dbt proj version
  • Loading branch information
rlittle08 authored Aug 19, 2024
1 parent bda68e2 commit b9acae3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

## Under the hood

# edu_wh v0.3.4
## Fixes
- Fix `bld_ef3__wide_school_network_assoc` to group across years, to correctly remove duplicates on `k_school`. Previously, incorrect duplicate records were created in `dim_school` in cases where multiple network types are configured in `xwalk_network_association_types`.

# edu_wh v0.3.3
## New features
- Add `fct_student_diploma` and a companion test for monitoring deduplicated data - `diploma_record_duplicates`
Expand Down
2 changes: 1 addition & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
config-version: 2

name: 'edu_wh'
version: '0.3.3'
version: '0.3.4'
require-dbt-version: [">=1.0.0", "<2.0.0"]

# This setting configures which "profile" dbt uses for this project.
Expand Down
7 changes: 3 additions & 4 deletions models/build/edfi_3/bld_ef3__wide_school_network_assoc.sql
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ wide as (

select
deduped.k_school,
deduped.tenant_code,
deduped.api_year
deduped.tenant_code
{% set network_types = dbt_utils.get_column_values(
table=ref('xwalk_network_association_types'),
column='network_type',
Expand All @@ -62,8 +61,8 @@ wide as (
from deduped
join xwalk_network_school_assoc_types xwalk
on deduped.network_purpose = xwalk.network_purpose
group by 1,2,3
group by 1,2

)

select * from wide
select * from wide

0 comments on commit b9acae3

Please sign in to comment.