Skip to content

Commit

Permalink
Merge pull request #83 from SoryRawyer/rds/at-risk-enrolled-at
Browse files Browse the repository at this point in the history
feat: add enrollment timestamp to at-risk learners (FC-0051)
  • Loading branch information
bmtcril authored May 3, 2024
2 parents 6681a2e + 5da3dcf commit b2fc935
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion models/grading/fact_student_status.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ select
{{ get_bucket("course_grade") }} as grade_bucket,
users.username as username,
users.name as name,
users.email as email
users.email as email,
fes.emission_time as enrolled_at
from {{ ref("fact_enrollment_status") }} fes
left join
{{ ref("fact_learner_course_status") }} lg
Expand Down
3 changes: 3 additions & 0 deletions models/grading/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,6 @@ models:
- name: email
data_type: String
description: "The email address of the learner"
- name: enrolled_at
data_type: DateTime
description: "The timestamp, to the second, of the most recent enrollment action for this learner and course."
1 change: 1 addition & 0 deletions models/users/dim_at_risk_learners.sql
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ select
learners.email as email,
learners.enrollment_mode as enrollment_mode,
learners.course_grade as course_grade,
learners.enrolled_at as enrolled_at,
page_visits.last_visited as last_visited
from {{ ref("fact_student_status") }} learners
join page_visits using (org, course_key, actor_id)
Expand Down
3 changes: 3 additions & 0 deletions models/users/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ models:
- name: course_grade
data_type: float64
description: "The most recent grade for the learner"
- name: enrolled_at
data_type: DateTime
description: "The timestamp, to the second, of the most recent enrollment action for this learner and course."
- name: last_visited
data_type: datetime
description: "The last time the learner visited a page for this course"

0 comments on commit b2fc935

Please sign in to comment.