From 12947a611cb97b38b695d719c2c6eea382fef085 Mon Sep 17 00:00:00 2001 From: Graham Hukill Date: Mon, 7 Oct 2024 10:15:04 -0400 Subject: [PATCH] Add ethnicity to Employees table Why these changes are being introduced: Ethnicity was a field defined in the Quickbase table, but was hidden from forms or reports, and was therefore missed in the first pass at building data loads for this table. How this addresses that need: * Updates Employees SQL query to include ethnicity information Side effects of this change: * Ethnicity now populating in Employees table Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/HRQB-54 --- hrqb/tasks/employees.py | 1 + hrqb/tasks/sql/employees.sql | 2 ++ tests/conftest.py | 1 + 3 files changed, 4 insertions(+) diff --git a/hrqb/tasks/employees.py b/hrqb/tasks/employees.py index 55ae036..1e1ab31 100644 --- a/hrqb/tasks/employees.py +++ b/hrqb/tasks/employees.py @@ -64,6 +64,7 @@ def get_dataframe(self) -> pd.DataFrame: "office_address": "Work Address Office", "office_phone": "Work Phone", "home_phone": "Cell Phone Number", + "ethnic_origin": "Ethnicity", "emergency_contact_name": "Emergency Contact Name", "emergency_contact_relation": "Emergency Contact Relationship", "emergency_contact_email": "Emergency Contact Email", diff --git a/hrqb/tasks/sql/employees.sql b/hrqb/tasks/sql/employees.sql index 43f394c..3185e69 100644 --- a/hrqb/tasks/sql/employees.sql +++ b/hrqb/tasks/sql/employees.sql @@ -7,6 +7,7 @@ CHANGELOG or retirement reason - 2024-10-07 Use table HR_APPT_ACTION_DETAIL vs HR_APPT_TX_DETAIL for termination details + - 2024-10-07 Add employee ethnicity to query */ with ordered_appt_txn as ( @@ -49,6 +50,7 @@ select e.OFFICE_ADDRESS, e.OFFICE_PHONE, e.HOME_PHONE, + e.ETHNIC_ORIGIN, e.EMERGENCY_CONTACT_NAME, e.EMERGENCY_CONTACT_RELATION, e.EMERGENCY_CONTACT_EMAIL, diff --git a/tests/conftest.py b/tests/conftest.py index b4cb707..bb95a1b 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -474,6 +474,7 @@ def task_extract_dw_employees_dw_dataframe(): "office_address": "77 Massachusetts Ave, Room 4-123", "office_phone": "617-253-1234", "home_phone": "617-555-6789", + "ethnic_origin": "Two or more races, not Hispanic/Latino", "emergency_contact_name": "Jane Doe", "emergency_contact_relation": "Spouse", "emergency_contact_email": "jane.doe@example.com",