Skip to content

Commit

Permalink
V0.1.1 rc1 (#19)
Browse files Browse the repository at this point in the history
* bump version

* extraneous comma

* prepare for deprecations

* remove namespacing of variables

dbt-labs/dbt-core#5587

* Update fct_student_assessment.sql (#18)
  • Loading branch information
ejoranlienea authored Dec 15, 2022
1 parent 095f10d commit 1b21693
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 34 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@

# Unreleased
# edu_wh v0.1.1
## New features
- Added parsing for `studentEducationOrganizationAssociation.indicators` in `dim_student`
- Allows arbitrary student indicators to be mapped into dim_student columns via a xwalk in the project template
- Fact and dimension tables for assessments
- Preserves all score results and performance levels, while allowing a customizable set to be pulled out as columns
- Added student ids to dim_student

## Under the hood
- Changed chronic absenteeism threshold to be inclusive to better align with common standards
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Include the following in your `packages.yml` file:
```
packages:
- package: edanalytics/edu_wh
version: 0.1.0
version: 0.1.1
```

> **Note**
Expand Down
51 changes: 25 additions & 26 deletions 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.1.0'
version: '0.1.1'

# This setting configures which "profile" dbt uses for this project.
profile: 'edu_wh'
Expand Down Expand Up @@ -32,29 +32,28 @@ models:
+schema: qc

vars:
edu_wh:
# labels for generated race/ethnicity groups
'edu:stu_demos:multiple_races_code': Multiple
'edu:stu_demos:hispanic_latino_code': Latinx
'edu:stu_demos:race_unknown_code': Unknown

# custom intersections of other demographic groupings
'edu:stu_demos:intersection_groups': Null
# custom data sources for student characteristics. must contain and be unique by `k_student`
'edu:stu_demos:custom_data_sources': Null

# rules for inclusion in 'special education' demographic group
# Begin and end dates to use for cutoffs, and a list of program names to exclude
'edu:special_ed:start_date_column': spec_ed_program_begin_date
'edu:special_ed:exit_date_column': spec_ed_program_end_date
'edu:special_ed:exclude_programs': Null

# label for 'Present' days generated from negative attendance
'edu:attendance:in_attendance_code': In Attendance
# threshold and minimum enrolled days for chronic absence definition
'edu:attendance:chronic_absence_threshold': 90
'edu:attendance:chronic_absence_min_days': 20

# withdraw codes that should exclude students from enrollment altogether
'edu:enroll:exclude_withdraw_codes': ['No show', 'Invalid enrollment']
# labels for generated race/ethnicity groups
'edu:stu_demos:multiple_races_code': Multiple
'edu:stu_demos:hispanic_latino_code': Latinx
'edu:stu_demos:race_unknown_code': Unknown

# custom intersections of other demographic groupings
'edu:stu_demos:intersection_groups': Null
# custom data sources for student characteristics. must contain and be unique by `k_student`
'edu:stu_demos:custom_data_sources': Null

# rules for inclusion in 'special education' demographic group
# Begin and end dates to use for cutoffs, and a list of program names to exclude
'edu:special_ed:start_date_column': spec_ed_program_begin_date
'edu:special_ed:exit_date_column': spec_ed_program_end_date
'edu:special_ed:exclude_programs': Null

# label for 'Present' days generated from negative attendance
'edu:attendance:in_attendance_code': In Attendance
# threshold and minimum enrolled days for chronic absence definition
'edu:attendance:chronic_absence_threshold': 90
'edu:attendance:chronic_absence_min_days': 20

# withdraw codes that should exclude students from enrollment altogether
'edu:enroll:exclude_withdraw_codes': ['No show', 'Invalid enrollment']

4 changes: 2 additions & 2 deletions macros/alias_pivot.sql
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ Arguments:
{% if distinct %} distinct {% endif -%}
case
{% if null_false %}
when equal_null({{column}}, '{{ dbt_utils.escape_single_quotes(value) }}')
when equal_null({{column}}, '{{ escape_single_quotes(value) }}')
{% else %}
when {{ column }} {{ cmp }} '{{ dbt_utils.escape_single_quotes(value) }}'
when {{ column }} {{ cmp }} '{{ escape_single_quotes(value) }}'
{% endif %}
then {{ then_value }}
else {{ else_value }}
Expand Down
7 changes: 4 additions & 3 deletions models/core_warehouse/fct_student_assessment.sql
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ student_assessments_wide as (
student_assessments.k_student_assessment,
student_assessments.k_assessment,
student_assessments.k_student,
student_assessments.student_assessment_identifier,
student_assessments.serial_number,
school_year,
administration_date,
administration_end_date,
Expand All @@ -40,7 +42,6 @@ student_assessments_wide as (
when_assessed_grade_level,
v_other_results
{%- if not is_empty_model('xwalk_assessment_scores') -%},
,
{{ dbt_utils.pivot(
'normalized_score_name',
dbt_utils.get_column_values(ref('xwalk_assessment_scores'), 'normalized_score_name'),
Expand All @@ -56,7 +57,7 @@ student_assessments_wide as (
and student_assessments_long_results.normalized_score_name != 'other'
left join object_agg_other_results
on student_assessments.k_student_assessment = object_agg_other_results.k_student_assessment
{{ dbt_utils.group_by(n=15) }}
{{ dbt_utils.group_by(n=17) }}
)
select *
from student_assessments_wide
from student_assessments_wide
2 changes: 1 addition & 1 deletion packages.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
packages:
- git: "https://github.com/edanalytics/edu_edfi_source.git"
revision: 0.1.0
revision: 0.1.1

0 comments on commit 1b21693

Please sign in to comment.