Skip to content

Commit 2bbd17b

Browse files
Hotfix: Lower grading_period_name in surrogate key (#111)
* Update stg_ef3__grading_periods.sql * Update CHANGELOG.md * Update dbt_project.yml --------- Co-authored-by: rlittle08 <[email protected]>
1 parent 5884ee1 commit 2bbd17b

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
## Under the hood
44
## Fixes
55

6+
# edu_edfi_source v0.4.2
7+
## Fixes
8+
- Fix surrogate key creation for `stg_ef3__grading_periods` to properly hanlde lowering of alphanumeric column (grading_period_name) that is part of natural key
9+
610
# edu_edfi_source v0.4.1
711
## Fixes
812
- Fix surrogate key creation for `stg_ef3__student_contact_associations` to properly hanlde lowering of alphanumeric columns that are part of natural keys

dbt_project.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
config-version: 2
22

33
name: 'edu_edfi_source'
4-
version: '0.4.1'
4+
version: '0.4.2'
55
require-dbt-version: [">=1.0.0", "<2.0.0"]
66

77
# This setting configures which "profile" dbt uses for this project.

models/staging/edfi_3/stage/stg_ef3__grading_periods.sql

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ keyed as (
1919
{{ dbt_utils.generate_surrogate_key(
2020
['tenant_code',
2121
'lower(grading_period)',
22-
'grading_period_name',
22+
'lower(grading_period_name)',
2323
'school_id',
2424
'school_year']
2525
) }}
@@ -40,4 +40,4 @@ deduped as (
4040
}}
4141
)
4242
select * from deduped
43-
order by tenant_code, school_year desc, period_sequence
43+
order by tenant_code, school_year desc, period_sequence

0 commit comments

Comments
 (0)