Feature/epdm models: create fct and dim tables for performance-based assessment of educator candidates#182
Feature/epdm models: create fct and dim tables for performance-based assessment of educator candidates#182oscarrezab wants to merge 4 commits intomainfrom
Conversation
| stg_performance_evaluations.v_rating_levels | ||
| from stg_performance_evaluation_ratings | ||
| join stg_performance_evaluations | ||
| on stg_performance_evaluation_ratings.k_performance_evaluation = stg_performance_evaluations.k_performance_evaluation |
There was a problem hiding this comment.
I think this messes with the grain by creating duplicates, since stg_performance_evaluation_ratings can have more than one record per k_performance_evaluation. But also, are you using any actual information from ratings here?
Looking closer, I think performance evalutions -> dim, but performance_evaluation_ratings -> fct. They should not both be included here.
I see how you got here, though. The terminology Ed-Fi uses for these two resources is confusing..
| stg_performance_evaluation_ratings.schedule_date, | ||
| stg_performance_evaluation_ratings.actual_date, | ||
| stg_performance_evaluation_ratings.actual_duration, | ||
| from dim_candidate |
There was a problem hiding this comment.
in general, the from table should be the 'many' in 'many-to-one' joins, eg from stg ... join dim. This is a logical flow because the grain is defined by the 'many' table, then we tack on extra information without changing the grain via dims
There was a problem hiding this comment.
what are the pros/cons to having a fct_candidate_assessment vs. a more generic fct_performance_evaluation_ratings that could be linked to any kind of person?
|
|
||
| formatted as ( | ||
| select | ||
| {{ dbt_utils.generate_surrogate_key( |
There was a problem hiding this comment.
no need for a surrogate key for fct tables, we typically only do this for dims, except in rare cases where other fct tables need a direct link to this fct
|
Implemented fixes suggested in comments. TODO
|
Description & motivation
Three models for EPDM data. Done as part of summer intern final project, with the hope of answering analytics questions from the SCDE. It is part of this Jira epic.
PR Merge Priority:
New files created:
dim_candidate.sql: dimension table to describe an educator candidatedim_candidate.yml: YAML to describe table abovedim_performance_evaluation.sql: dimension table to describe a performance evaluationdim_performance_evaluation.yml: YAML to describe table abovefct_candidate_assessment.sql: fact table to describe the event of a performance evaluation for a given educator candidate, including rating and resultsfct_candidate_assessment.yml: YAML to describe table aboveTests and QC done:
edu_wh PR Review Checklist:
Make sure the following have been completed before approving this PR:
## New Featuresfor features, etc.