Skip to content

Feature/epdm models: create fct and dim tables for performance-based assessment of educator candidates#182

Draft
oscarrezab wants to merge 4 commits intomainfrom
feature/epdm_models
Draft

Feature/epdm models: create fct and dim tables for performance-based assessment of educator candidates#182
oscarrezab wants to merge 4 commits intomainfrom
feature/epdm_models

Conversation

@oscarrezab
Copy link
Copy Markdown

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:

  • Low

New files created:

  • dim_candidate.sql: dimension table to describe an educator candidate
  • dim_candidate.yml: YAML to describe table above
  • dim_performance_evaluation.sql: dimension table to describe a performance evaluation
  • dim_performance_evaluation.yml: YAML to describe table above
  • fct_candidate_assessment.sql: fact table to describe the event of a performance evaluation for a given educator candidate, including rating and results
  • fct_candidate_assessment.yml: YAML to describe table above

Tests and QC done:

  • Executed successful dbt project run in TX stadium.

edu_wh PR Review Checklist:

Make sure the following have been completed before approving this PR:

  • Description of changes has been added to Unreleased section of CHANGELOG.md. Add under ## New Features for features, etc.
  • If a new configuration xwalk was added:
    • The code is written such that the xwalk is optional (preferred), and this behavior was tested, OR
    • The code is written such that the xwalk is required, and the required xwalk is added to edu_project_template, and this PR is flagged as breaking change (not for patch release)
    • A description for the new xwalk has been added to EDU documentation site here
  • If a new configuration variable was added:
    • The code is written such that the variable is optional (preferred), and this behavior was tested, OR
    • The code is written such that the variable is required, and a default value was added to edu_project_template, and this PR is flagged as breaking change (not for patch release)
    • A description for the new variable has been added to EDU documentation site here
  • Reviewer confirms the grain of all tables are unchanged, OR any changes are expected, communicated, and this PR is flagged as a breaking change (not for patch release)
  • Build the other models related to this project.

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
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@rlittle08 rlittle08 marked this pull request as draft August 6, 2025 17:51
@oscarrezab
Copy link
Copy Markdown
Author

Implemented fixes suggested in comments.

TODO

  • Continue to think about the renaming and repurposing of the fct_candidate_assessment table. One option is to let it generally be a fct_performance_evaluation_rating table that allows for evaluations for any type of person.
    • This would require more conversation of the role of person in EPDM and thus in the warehouse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants