Skip to content

Commit

Permalink
PATCH: lower key in stu_contact_assoc (#109)
Browse files Browse the repository at this point in the history
* need to lower the string before keying

* Update CHANGELOG.md

* Update dbt_project.yml
  • Loading branch information
rlittle08 authored Oct 9, 2024
1 parent c2baa25 commit 5884ee1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 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
## Fixes

# edu_edfi_source v0.4.1
## Fixes
- Fix surrogate key creation for `stg_ef3__student_contact_associations` to properly hanlde lowering of alphanumeric columns that are part of natural keys

# edu_edfi_source v0.4.0
## New features
- Add `stg_ef3__stu_ed_org__cohort_years` tracking student cohort designations (flattens Ed-Fi collection `cohort_years` for easier downstream use)
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_edfi_source'
version: '0.4.0'
version: '0.4.1'
require-dbt-version: [">=1.0.0", "<2.0.0"]

# This setting configures which "profile" dbt uses for this project.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ keyed as (
select
{{ gen_skey('k_student') }},
-- we can't use the gen_skey macro here because we're bringing in the deprecated parents endpoint data, which contains a parentReference that won't work
{{ dbt_utils.generate_surrogate_key(['tenant_code', 'contact_unique_id']) }} as k_contact,
{{ dbt_utils.generate_surrogate_key(['tenant_code', 'lower(contact_unique_id)']) }} as k_contact,
{{ gen_skey('k_student_xyear') }},
api_year as school_year,
unioned.*
Expand Down

0 comments on commit 5884ee1

Please sign in to comment.