Skip to content

Commit

Permalink
renlearn models
Browse files Browse the repository at this point in the history
  • Loading branch information
cbini committed Sep 19, 2023
1 parent d402224 commit 522fa82
Show file tree
Hide file tree
Showing 22 changed files with 625 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy-prod-kippcamden.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ on:
- .dagster/dagster-cloud-kippcamden.yaml
- src/teamster/core/**
- src/teamster/kippcamden/**
- src/dbt/kippcamden/**
- src/dbt/deanslist/**
- src/dbt/edplan/**
- src/dbt/pearson/**
- src/dbt/powerschool/**
- src/dbt/titan/**
- src/dbt/teamster_utils/**
- src/dbt/kippcamden/**
- src/dbt/titan/**

env:
CODE_LOCATION: kippcamden
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/deploy-prod-kippmiami.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ on:
- .dagster/dagster-cloud-kippmiami.yaml
- src/teamster/core/**
- src/teamster/kippmiami/**
- src/dbt/kippmiami/**
- src/dbt/deanslist/**
- src/dbt/iready/**
- src/dbt/powerschool/**
- src/dbt/renlearn/**
- src/dbt/teamster_utils/**
- src/dbt/kippmiami/**

env:
CODE_LOCATION: kippmiami
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/deploy-prod-kippnewark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ on:
- .dagster/dagster-cloud-kippnewark.yaml
- src/teamster/core/**
- src/teamster/kippnewark/**
- src/dbt/kippnewark/**
- src/dbt/deanslist/**
- src/dbt/edplan/**
- src/dbt/iready/**
- src/dbt/pearson/**
- src/dbt/powerschool/**
- src/dbt/titan/**
- src/dbt/renlearn/**
- src/dbt/teamster_utils/**
- src/dbt/kippnewark/**
- src/dbt/titan/**

env:
CODE_LOCATION: kippnewark
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-prod-kipptaf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ on:
- .dagster/dagster-cloud-kipptaf.yaml
- src/teamster/core/**
- src/teamster/kipptaf/**
- src/dbt/teamster_utils/**
- src/dbt/kipptaf/**
- src/dbt/teamster_utils/**

env:
CODE_LOCATION: kipptaf
Expand Down
20 changes: 20 additions & 0 deletions src/dbt/kippnewark/dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ vars:
powerschool_schema: kippnewark_powerschool
titan_schema: kippnewark_titan
iready_schema: kippnj_iready
renlearn_schema: kippnj_renlearn

# Configuring models
# Full documentation: https://docs.getdbt.com/docs/configuring-models
Expand All @@ -53,5 +54,24 @@ models:
powerschool:
+schema: powerschool
+materialized: table
renlearn:
+schema: renlearn
staging:
stg_renlearn__fast_star:
+enabled: false
stg_renlearn__star_dashboard_standards:
+enabled: false
stg_renlearn__star_skill_area:
+enabled: false
titan:
+schema: titan

sources:
renlearn:
renlearn:
src_renlearn__star_skill_area:
+enabled: false
src_renlearn__star_dashboard_standards:
+enabled: false
src_renlearn__fast_star:
+enabled: false
1 change: 1 addition & 0 deletions src/dbt/kippnewark/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ packages:
- local: ../iready
- local: ../pearson
- local: ../powerschool
- local: ../renlearn
- local: ../titan
2 changes: 2 additions & 0 deletions src/dbt/kipptaf/dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ models:
+materialized: table
powerschool:
+schema: powerschool
renlearn:
+schema: renlearn
reporting:
+schema: reporting
staging:
Expand Down
6 changes: 3 additions & 3 deletions src/dbt/kipptaf/models/iready/sources-kippmiami.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ sources:
- name: stg_iready__diagnostic_results
meta:
dagster:
group: powerschool
group: iready
asset_key:
- kippmiami
- iready
- stg_iready__diagnostic_results
- name: stg_iready__instructional_usage_data
meta:
dagster:
group: powerschool
group: iready
asset_key:
- kippmiami
- iready
- stg_iready__instructional_usage_data
- name: stg_iready__personalized_instruction_by_lesson
meta:
dagster:
group: powerschool
group: iready
asset_key:
- kippmiami
- iready
Expand Down
6 changes: 3 additions & 3 deletions src/dbt/kipptaf/models/iready/sources-kippnj.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ sources:
- name: stg_iready__diagnostic_results
meta:
dagster:
group: powerschool
group: iready
asset_key:
- kippnewark
- iready
- stg_iready__diagnostic_results
- name: stg_iready__instructional_usage_data
meta:
dagster:
group: powerschool
group: iready
asset_key:
- kippnewark
- iready
- stg_iready__instructional_usage_data
- name: stg_iready__personalized_instruction_by_lesson
meta:
dagster:
group: powerschool
group: iready
asset_key:
- kippnewark
- iready
Expand Down
45 changes: 45 additions & 0 deletions src/dbt/kipptaf/models/renlearn/sources-kippmiami.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
version: 2

sources:
- name: kippmiami_renlearn
tables:
- name: stg_renlearn__accelerated_reader
meta:
dagster:
group: renlearn
asset_key:
- kippmiami
- renlearn
- stg_renlearn__accelerated_reader
- name: stg_renlearn__fast_star
meta:
dagster:
group: renlearn
asset_key:
- kippmiami
- renlearn
- stg_renlearn__fast_star
- name: stg_renlearn__star_dashboard_standards
meta:
dagster:
group: renlearn
asset_key:
- kippmiami
- renlearn
- stg_renlearn__star_dashboard_standards
- name: stg_renlearn__star_skill_area
meta:
dagster:
group: renlearn
asset_key:
- kippmiami
- renlearn
- stg_renlearn__star_skill_area
- name: stg_renlearn__star
meta:
dagster:
group: renlearn
asset_key:
- kippmiami
- renlearn
- stg_renlearn__star
22 changes: 22 additions & 0 deletions src/dbt/kipptaf/models/renlearn/sources-kippnj.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: 2

sources:
- name: kippnj_renlearn
schema: kippnewark_renlearn
tables:
- name: stg_renlearn__accelerated_reader
meta:
dagster:
group: renlearn
asset_key:
- kippnewark
- renlearn
- stg_renlearn__accelerated_reader
- name: stg_renlearn__star
meta:
dagster:
group: renlearn
asset_key:
- kippnewark
- renlearn
- stg_renlearn__star
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{{
dbt_utils.union_relations(
relations=[
source("kippnj_renlearn", model.name),
source("kippmiami_renlearn", model.name),
]
)
}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{{
dbt_utils.union_relations(
relations=[
source("kippmiami_renlearn", model.name),
]
)
}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{{
dbt_utils.union_relations(
relations=[
source("kippnj_renlearn", model.name),
source("kippmiami_renlearn", model.name),
]
)
}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{{
dbt_utils.union_relations(
relations=[
source("kippmiami_renlearn", model.name),
]
)
}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{{
dbt_utils.union_relations(
relations=[
source("kippmiami_renlearn", model.name),
]
)
}}
3 changes: 2 additions & 1 deletion src/dbt/renlearn/dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ clean-targets: # directories to be removed by `dbt clean`
# Full documentation: https://docs.getdbt.com/docs/configuring-models
models:
renlearn:
+materialized: table
staging:
+materialized: table

vars:
cloud_storage_uri_base: null
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
select
_dagster_partition_fiscal_year as `_dagster_partition_fiscal_year`,
_dagster_partition_subject as `_dagster_partition_subject`,
americanindianoralaskanative as `american_indian_or_alaska_native`,
asian as `asian`,
audioused as `audio_used`,
author as `author`,
birthdate as `birth_date`,
blackorafricanamerican as `black_or_african_american`,
booklevel as `book_level`,
bookrating as `book_rating`,
classcode as `class_code`,
classrenaissanceid as `class_renaissance_id`,
classsourcedid as `class_sourced_id`,
contentlanguage as `content_language`,
contenttitle as `content_title`,
coursecode as `course_code`,
coursename as `course_name`,
courserenaissanceid as `course_renaissance_id`,
coursesourcedid as `course_sourced_id`,
datequizcompleted as `date_quiz_completed`,
datequizcompletedlocal as `date_quiz_completed_local`,
districtidentifier as `district_identifier`,
districtname as `district_name`,
districtrenaissanceid as `district_renaissance_id`,
districtsourcedid as `district_sourced_id`,
enrollmentstatus as `enrollment_status`,
fictionnonfiction as `fiction_non_fiction`,
gender as `gender`,
groupid as `group_id`,
grouporclassname as `group_or_class_name`,
hispanicorlatino as `hispanic_or_latino`,
interestlevel as `interest_level`,
lexilelevel as `lexile_level`,
multirace as `multi_race`,
nativehawaiianorotherpacificislander as `native_hawaiian_or_other_pacific_islander`,
passed as `passed`,
percentcorrect as `percent_correct`,
pointsearned as `points_earned`,
pointspossible as `points_possible`,
questionscorrect as `questions_correct`,
questionspresented as `questions_presented`,
quizdeleted as `quiz_deleted`,
quiznumber as `quiz_number`,
quiztype as `quiz_type`,
renaissanceclientid as `renaissance_client_id`,
schoolidentifier as `school_identifier`,
schoolname as `school_name`,
schoolrenaissanceid as `school_renaissance_id`,
schoolsourcedid as `school_sourced_id`,
schoolyear as `school_year`,
schoolyearenddate as `school_year_end_date`,
schoolyearstartdate as `school_year_start_date`,
studentemail as `student_email`,
studentfirstname as `student_first_name`,
studentlastname as `student_last_name`,
studentmiddlename as `student_middle_name`,
studentrenaissanceid as `student_renaissance_id`,
teacheremail as `teacher_email`,
teacherfirstname as `teacher_first_name`,
teacheridentifier as `teacher_identifier`,
teacherlastname as `teacher_last_name`,
teachermiddlename as `teacher_middle_name`,
teacherrenaissanceid as `teacher_renaissance_id`,
teachersourcedid as `teacher_sourced_id`,
teacheruserid as `teacher_user_id`,
twi as `twi`,
white as `white`,
wordcount as `word_count`,
coalesce(
currentgrade.string_value, safe_cast(currentgrade.long_value as string)
) as `current_grade`,
coalesce(
lexilemeasure.string_value, safe_cast(lexilemeasure.int_value as string)
) as `lexile_measure`,
coalesce(
studentstateid.string_value, safe_cast(studentstateid.double_value as string)
) as `student_state_id`,
coalesce(
districtstateid.long_value, safe_cast(districtstateid.double_value as int)
) as `district_state_id`,
coalesce(
schoolstateid.long_value, safe_cast(schoolstateid.double_value as int)
) as `school_state_id`,
coalesce(
studentidentifier.long_value, safe_cast(studentidentifier.double_value as int)
) as `student_identifier`,
coalesce(
studentsourcedid.long_value, safe_cast(studentsourcedid.double_value as int)
) as `student_sourced_id`,
coalesce(
studentuserid.long_value, safe_cast(studentuserid.float_value as int)
) as `student_user_id`,
coalesce(
teacherstateid.long_value, safe_cast(teacherstateid.double_value as int)
) as `teacher_state_id`,
from {{ source("renlearn", "src_renlearn__accelerated_reader") }}
Loading

0 comments on commit 522fa82

Please sign in to comment.