Skip to content

Commit

Permalink
added tests + documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
allison-code-dot-org committed Jan 23, 2024
1 parent 3ab527e commit 644b78a
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 10 deletions.
54 changes: 45 additions & 9 deletions dbt/models/marts/metrics/_metrics__models.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,32 +23,68 @@ models:

- name: fct_monthly_accounts_created
description: total teacher and student accounts created each month, segmented by user type and us/intl
tests:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- user_type
- us_intl
- created_at_school_year
- created_at_year
- created_at_month
columns:
- name: user_type
description: teacher or student
tests:
- not_null
- name: us_intl
description: whether the account was created in the US or outside the US
tests:
- not_null
- name: created_at_school_year
description: school year in which the accounts were created
tests:
- not_null
- name: created_at_year
description: the calendar year in which the accounts were created
tests:
- not_null
- name: created_at_month
description: the month number in which the accounts were created
tests:
- not_null
- name: num_accounts
description: the number of accounts created in that school year, month, user type and geography

- name: fct_monthly_signed_in_users
description: total users who signed in each month, segmented by user type and us/intl
tests:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- user_type
- us_intl
- sign_in_school_year
- sign_in_year
- sign_in_month
columns:
- name: user_type
description: teacher or student
tests:
- not_null
- name: us_intl
description: whether the account was created in the US or outside the US
- name: created_at_school_year
description: school year in which the accounts were created
- name: created_at_year
description: the calendar year in which the accounts were created
- name: created_at_month
description: the month number in which the accounts were created
- name: num_accounts
description: the number of accounts created in that school year, month, user type and geography
description: whether the user who signed in was in the US or outside the US
tests:
- not_null
- name: sign_in_school_year
description: school year in which users signed in
tests:
- not_null
- name: sign_in_year
description: the calendar year in which users signed in
tests:
- not_null
- name: sign_in_month
description: the month number in which users signed in
tests:
- not_null
- name: num_signed_in_users
description: the number of users who signed in in that school year, month, user type and geography
2 changes: 1 addition & 1 deletion dbt/models/marts/schools/_schools__models.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2

models:
- name: dim_school_districs
descrition: 1 row per school_distric_id with dimensions and school related aggregations
description: 1 row per school_distric_id with dimensions and school related aggregations
columns:
- name: school_district_id
tests:
Expand Down

0 comments on commit 644b78a

Please sign in to comment.