From 97aa281a1280e7578cb966f18aa64a406e238906 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Burwash?= <35510512+SBurwash@users.noreply.github.com> Date: Wed, 3 Jan 2024 12:01:32 -0500 Subject: [PATCH] DE-2547 Hibob - Deprecation of employees endpoint - Add missing data (#57) * Added new data source * Added schema elements --- tap_hibob/schemas/EmployeesSearch.py | 31 +++++++++++++++++++++------- tap_hibob/streams.py | 3 +++ 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/tap_hibob/schemas/EmployeesSearch.py b/tap_hibob/schemas/EmployeesSearch.py index 3752d6c..bbd787d 100644 --- a/tap_hibob/schemas/EmployeesSearch.py +++ b/tap_hibob/schemas/EmployeesSearch.py @@ -13,6 +13,7 @@ "internal", th.ObjectType( th.Property("terminationReason", th.StringType), + th.Property("terminationType", th.StringType), th.Property("probationEndDate", th.StringType), th.Property("terminationDate", th.StringType), ), @@ -26,6 +27,7 @@ th.Property("column_1655996461265", th.StringType), th.Property("column_1644862416222", th.ArrayType(th.StringType)), th.Property("column_1644861659664", th.ArrayType(th.StringType)), + th.Property("column_1664478354663", th.ArrayType(th.StringType)), ), ), th.Property( @@ -42,15 +44,16 @@ ), th.Property( "payroll", + th.ObjectType( + th.Property( + "employment", th.ObjectType( - th.Property( - "employment", - th.ObjectType( - th.Property("type", th.StringType), - th.Property("contract", th.StringType), - ), - ), + th.Property("type", th.StringType), + th.Property("contract", th.StringType), + th.Property("weeklyHours", th.IntegerType), ), + ), + ), ), th.Property( "personal", @@ -99,6 +102,7 @@ "internal", th.ObjectType( th.Property("terminationReason", th.StringType), + th.Property("terminationType", th.StringType), th.Property("probationEndDate", th.StringType), th.Property("terminationDate", th.StringType), ), @@ -117,6 +121,7 @@ th.ObjectType( th.Property("type", th.StringType), th.Property("contract", th.StringType), + th.Property("weeklyHours", th.StringType), ), ), ), @@ -138,6 +143,10 @@ "/work/customColumns/column_1644861659664", th.ObjectType(th.Property("value", th.ArrayType(th.StringType))), ), + th.Property( + "/work/customColumns/column_1664478354663", + th.ObjectType(th.Property("value", th.ArrayType(th.StringType))), + ), th.Property("/work/department", th.ObjectType(th.Property("value", th.StringType))), th.Property("/root/fullName", th.ObjectType(th.Property("value", th.StringType))), th.Property( @@ -157,6 +166,10 @@ "/payroll/employment/contract", th.ObjectType(th.Property("value", th.StringType)), ), + th.Property( + "/payroll/employment/weeklyHours", + th.ObjectType(th.Property("value", th.IntegerType)), + ), th.Property( "/internal/terminationDate", th.ObjectType(th.Property("value", th.DateTimeType)), @@ -168,6 +181,10 @@ "/internal/terminationReason", th.ObjectType(th.Property("value", th.StringType)), ), + th.Property( + "/internal/terminationType", + th.ObjectType(th.Property("value", th.StringType)), + ), th.Property( "/personal/pronouns", th.ObjectType(th.Property("value", th.StringType)), diff --git a/tap_hibob/streams.py b/tap_hibob/streams.py index 8bcb946..06f2f39 100644 --- a/tap_hibob/streams.py +++ b/tap_hibob/streams.py @@ -86,14 +86,17 @@ def prepare_request_payload( "/personal/pronouns", "/payroll/employment/type", "/payroll/employment/contract", + "/payroll/employment/weeklyHours", "/work/customColumns/column_1644862416222", "/work/customColumns/column_1644861659664", + "/work/customColumns/column_1664478354663", "/work/custom/field_1651169416679", "/work/title", "/work/site", "/work/department", "/work/isManager", "/internal/terminationReason", + "/internal/terminationType", "/internal/probationEndDate", "/internal/terminationDate" ],