Skip to content

Commit

Permalink
fix: schema
Browse files Browse the repository at this point in the history
  • Loading branch information
cbini committed Jul 9, 2024
1 parent 4b884e7 commit 89bc27b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ select
teacher_id,
rubric_id,
form_long_name as rubric_name,
observer_employee_number,
measurement_name,
row_score_value as value_score,
score_measurement_type,
Expand All @@ -23,7 +22,6 @@ select
etr_tier,
so_score,
final_score,
final_tier,

true as locked,
'Teacher Performance Management' as observation_type,
Expand All @@ -34,6 +32,11 @@ select
date(observed_at) as observed_at_date_local,

coalesce(so_tier.long_value, cast(so_tier.double_value as int)) as so_tier,
coalesce(final_tier.long_value, cast(final_tier.double_value as int)) as final_tier,
coalesce(
observer_employee_number.long_value,
cast(observer_employee_number.double_value as int)
) as observer_employee_number,

case
when score_measurement_type = 'etr'
Expand Down
4 changes: 2 additions & 2 deletions src/teamster/libraries/performance_management/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ class ObservationDetail(BaseModel):
etr_score: float | None = None
etr_tier: float | None = None
final_score: float | None = None
final_tier: int | None = None
form_long_name: str | None = None
form_term: str | None = None
form_type: str | None = None
Expand All @@ -65,7 +64,6 @@ class ObservationDetail(BaseModel):
measurement_name: str | None = None
observation_id: str | None = None
observed_at: str | None = None
observer_employee_number: int | None = None
overall_score: float | None = None
overall_tier: float | None = None
pm_term: str | None = None
Expand All @@ -79,4 +77,6 @@ class ObservationDetail(BaseModel):
teacher_id: str | None = None
text_box: str | None = None

final_tier: int | float | None = None
observer_employee_number: int | float | None = None
so_tier: int | float | None = None
2 changes: 1 addition & 1 deletion tests/assets/test_sftp_pm_assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ def _test_asset(asset, partition_key=None):


def test_performance_management_observation_details_kipptaf():
_test_asset(asset=observation_details, partition_key="2022|PM3")
_test_asset(asset=observation_details, partition_key="2021|PM3")

0 comments on commit 89bc27b

Please sign in to comment.