-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #291 from TEAMSchools/miami-fast
Miami fast
- Loading branch information
Showing
7 changed files
with
210 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
version: 2 | ||
|
||
sources: | ||
- name: fldoe | ||
schema: kippmiami_fldoe | ||
tags: | ||
- stage_external_sources | ||
tables: | ||
- name: src_fldoe__fast | ||
external: | ||
location: "{{ var('cloud_storage_uri_base') }}/fldoe/fast/*" | ||
options: | ||
hive_partition_uri_prefix: "{{ var('cloud_storage_uri_base') }}/fldoe/fast/" | ||
format: AVRO | ||
enable_logical_types: true |
152 changes: 152 additions & 0 deletions
152
src/dbt/kippmiami/models/fldoe/staging/stg_fldoe__fast.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
select | ||
_dagster_partition_school_year, | ||
_dagster_partition_term, | ||
student_id, | ||
local_id, | ||
student_name, | ||
test_reason, | ||
test_oppnumber, | ||
primary_exceptionality, | ||
section_504, | ||
english_language_learner_ell_status, | ||
ethnicity, | ||
gender_k_12, | ||
gender_postsecondary_only, | ||
enrolled_district, | ||
enrolled_grade, | ||
enrolled_school, | ||
testing_location, | ||
safe_cast(date_taken as date) as date_taken, | ||
safe_cast(test_completion_date as date) as test_completion_date, | ||
{# student_dob, #} | ||
coalesce( | ||
fast_grade_3_ela_reading_achievement_level, | ||
grade_3_fast_ela_reading_achievement_level, | ||
fast_grade_4_ela_reading_achievement_level, | ||
grade_4_fast_ela_reading_achievement_level, | ||
fast_grade_5_ela_reading_achievement_level, | ||
grade_5_fast_ela_reading_achievement_level, | ||
fast_grade_6_ela_reading_achievement_level, | ||
grade_6_fast_ela_reading_achievement_level, | ||
fast_grade_7_ela_reading_achievement_level, | ||
grade_7_fast_ela_reading_achievement_level, | ||
fast_grade_8_ela_reading_achievement_level, | ||
grade_8_fast_ela_reading_achievement_level | ||
) as ela_reading_achievement_level, | ||
|
||
coalesce( | ||
fast_grade_3_ela_reading_percentile_rank, | ||
grade_3_fast_ela_reading_percentile_rank, | ||
fast_grade_4_ela_reading_percentile_rank, | ||
grade_4_fast_ela_reading_percentile_rank, | ||
fast_grade_5_ela_reading_percentile_rank, | ||
grade_5_fast_ela_reading_percentile_rank, | ||
fast_grade_6_ela_reading_percentile_rank, | ||
grade_6_fast_ela_reading_percentile_rank, | ||
fast_grade_7_ela_reading_percentile_rank, | ||
grade_7_fast_ela_reading_percentile_rank, | ||
fast_grade_8_ela_reading_percentile_rank, | ||
grade_8_fast_ela_reading_percentile_rank | ||
) as ela_reading_percentile_rank, | ||
|
||
coalesce( | ||
fast_grade_3_ela_reading_scale_score, | ||
grade_3_fast_ela_reading_scale_score.long_value, | ||
safe_cast(grade_3_fast_ela_reading_scale_score.string_value as int), | ||
fast_grade_4_ela_reading_scale_score, | ||
grade_4_fast_ela_reading_scale_score, | ||
fast_grade_5_ela_reading_scale_score, | ||
grade_5_fast_ela_reading_scale_score, | ||
fast_grade_6_ela_reading_scale_score, | ||
grade_6_fast_ela_reading_scale_score, | ||
fast_grade_7_ela_reading_scale_score, | ||
grade_7_fast_ela_reading_scale_score, | ||
fast_grade_8_ela_reading_scale_score, | ||
grade_8_fast_ela_reading_scale_score | ||
) as ela_reading_scale_score, | ||
|
||
coalesce( | ||
fast_grade_3_mathematics_achievement_level, | ||
grade_3_fast_mathematics_achievement_level, | ||
fast_grade_4_mathematics_achievement_level, | ||
grade_4_fast_mathematics_achievement_level, | ||
fast_grade_5_mathematics_achievement_level, | ||
grade_5_fast_mathematics_achievement_level, | ||
fast_grade_6_mathematics_achievement_level, | ||
grade_6_fast_mathematics_achievement_level, | ||
fast_grade_7_mathematics_achievement_level, | ||
grade_7_fast_mathematics_achievement_level, | ||
fast_grade_8_mathematics_achievement_level, | ||
grade_8_fast_mathematics_achievement_level | ||
) as mathematics_achievement_level, | ||
|
||
coalesce( | ||
fast_grade_3_mathematics_percentile_rank, | ||
grade_3_fast_mathematics_percentile_rank, | ||
fast_grade_4_mathematics_percentile_rank, | ||
grade_4_fast_mathematics_percentile_rank, | ||
fast_grade_5_mathematics_percentile_rank, | ||
grade_5_fast_mathematics_percentile_rank, | ||
fast_grade_6_mathematics_percentile_rank, | ||
grade_6_fast_mathematics_percentile_rank, | ||
fast_grade_7_mathematics_percentile_rank, | ||
grade_7_fast_mathematics_percentile_rank, | ||
fast_grade_8_mathematics_percentile_rank, | ||
grade_8_fast_mathematics_percentile_rank | ||
) as mathematics_percentile_rank, | ||
|
||
coalesce( | ||
safe_cast(fast_grade_3_mathematics_scale_score as int), | ||
grade_3_fast_mathematics_scale_score.long_value, | ||
safe_cast(grade_3_fast_mathematics_scale_score.string_value as int), | ||
fast_grade_4_mathematics_scale_score.long_value, | ||
safe_cast(fast_grade_4_mathematics_scale_score.string_value as int), | ||
grade_4_fast_mathematics_scale_score.long_value, | ||
safe_cast(grade_4_fast_mathematics_scale_score.string_value as int), | ||
fast_grade_5_mathematics_scale_score.long_value, | ||
safe_cast(fast_grade_5_mathematics_scale_score.string_value as int), | ||
grade_5_fast_mathematics_scale_score.long_value, | ||
safe_cast(grade_5_fast_mathematics_scale_score.string_value as int), | ||
fast_grade_6_mathematics_scale_score.long_value, | ||
safe_cast(fast_grade_6_mathematics_scale_score.string_value as int), | ||
grade_6_fast_mathematics_scale_score.long_value, | ||
safe_cast(grade_6_fast_mathematics_scale_score.string_value as int), | ||
fast_grade_7_mathematics_scale_score.long_value, | ||
safe_cast(fast_grade_7_mathematics_scale_score.string_value as int), | ||
grade_7_fast_mathematics_scale_score.long_value, | ||
safe_cast(grade_7_fast_mathematics_scale_score.string_value as int), | ||
fast_grade_8_mathematics_scale_score.long_value, | ||
safe_cast(fast_grade_8_mathematics_scale_score.string_value as int), | ||
grade_8_fast_mathematics_scale_score.long_value, | ||
safe_cast(grade_8_fast_mathematics_scale_score.string_value as int) | ||
) as mathematics_scale_score, | ||
|
||
`1_reading_prose_and_poetry_performance`, | ||
`2_reading_informational_text_performance`, | ||
`3_reading_across_genres_vocabulary_performance`, | ||
|
||
`1_number_sense_and_additive_reasoning_performance`, | ||
`1_number_sense_and_operations_and_algebraic_reasoning_performance`, | ||
`1_number_sense_and_operations_and_probability_performance`, | ||
`1_number_sense_and_operations_performance`, | ||
`1_number_sense_and_operations_with_whole_numbers_performance`, | ||
`2_number_sense_and_multiplicative_reasoning_performance`, | ||
`2_number_sense_and_operations_with_fractions_and_decimals_performance`, | ||
|
||
`2_algebraic_reasoning_performance`, | ||
`3_algebraic_reasoning_performance`, | ||
|
||
`2_proportional_reasoning_and_relationships_performance`, | ||
|
||
`3_fractional_reasoning_performance`, | ||
|
||
`3_geometric_reasoning_data_analysis_and_probability_performance`, | ||
`3_geometric_reasoning_measurement_and_data_analysis_and_probability_performance`, | ||
`3_geometric_reasoning_performance`, | ||
`4_geometric_reasoning_measurement_and_data_analysis_and_probability_performance`, | ||
`4_geometric_reasoning_performance`, | ||
|
||
`3_linear_relationships_data_analysis_and_functions_performance`, | ||
|
||
`4_data_analysis_and_probability_performance`, | ||
from {{ source('fldoe', 'src_fldoe__fast') }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,22 @@ | ||
assets: | ||
- asset_name: fast | ||
remote_filepath: /teamster-kippmiami/couchdrop/fldoe/fast/(?P<school_year>\d+)/(?P<term>PM\d) | ||
remote_file_regex: .*\.csv | ||
remote_filepath: /teamster-kippmiami/couchdrop/fldoe/fast/(?P<school_year_term>) | ||
remote_file_regex: .*(?P<grade_level_subject>).*\.csv | ||
partition_keys: | ||
school_year: | ||
- "2023" | ||
- "2022" | ||
term: | ||
- PM1 | ||
- PM2 | ||
- PM3 | ||
school_year_term: | ||
- 2022/PM1 | ||
- 2022/PM2 | ||
- 2022/PM3 | ||
grade_level_subject: | ||
- 3\w*ELAReading | ||
- 3\w*Mathematics | ||
- 4\w*ELAReading | ||
- 4\w*Mathematics | ||
- 5\w*ELAReading | ||
- 5\w*Mathematics | ||
- 6\w*ELAReading | ||
- 6\w*Mathematics | ||
- 7\w*ELAReading | ||
- 7\w*Mathematics | ||
- 8\w*ELAReading | ||
- 8\w*Mathematics |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters