From f5410a3f19ba5fc182dc2c47e015c3bdeae9357c Mon Sep 17 00:00:00 2001 From: Marco Marasca <8505576+marcomarasca@users.noreply.github.com> Date: Wed, 31 Jan 2024 10:13:27 -0800 Subject: [PATCH 1/2] PLFM-8218: Add 2fa info to user profile --- src/scripts/glue_jobs/user_profile_snapshots.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scripts/glue_jobs/user_profile_snapshots.py b/src/scripts/glue_jobs/user_profile_snapshots.py index d7264b1..3ea90b3 100644 --- a/src/scripts/glue_jobs/user_profile_snapshots.py +++ b/src/scripts/glue_jobs/user_profile_snapshots.py @@ -57,6 +57,7 @@ def get_email(emails): ("snapshot.location", "string", "location", "string"), ("snapshot.company", "string", "company", "string"), ("snapshot.position", "string", "position", "string"), - ("snapshot.createdOn", "bigint", "created_on", "timestamp") + ("snapshot.createdOn", "bigint", "created_on", "timestamp"), + ("snapshot.twoFactorAuthEnabled", "boolean", "is_two_factor_auth_enabled", "boolean") ] user_profile_snapshots = UserProfileSnapshots(mapping_list, PARTITION_KEY) From 509c2198a1f4a6d79dfb38d7386d96fec058b6da Mon Sep 17 00:00:00 2001 From: Marco Marasca <8505576+marcomarasca@users.noreply.github.com> Date: Wed, 31 Jan 2024 15:22:17 -0800 Subject: [PATCH 2/2] Fix error log bug --- src/scripts/glue_jobs/user_profile_snapshots.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/glue_jobs/user_profile_snapshots.py b/src/scripts/glue_jobs/user_profile_snapshots.py index 3ea90b3..e61abec 100644 --- a/src/scripts/glue_jobs/user_profile_snapshots.py +++ b/src/scripts/glue_jobs/user_profile_snapshots.py @@ -19,7 +19,7 @@ def __init__(self, mapping_list, partition_key): def execute(self, dynamic_frame): transformed_frame = dynamic_frame.map(f=UserProfileSnapshots.transform) if transformed_frame.stageErrorsCount() > 0: - self.log_errors(dynamic_frame) + self.log_errors(transformed_frame) # Filed emails is list , which we need to get first email from list if it's not empty, so drop emails field droppedColumn_frame = transformed_frame.drop_fields(paths=[EMAILS], transformation_ctx="droppedColumn_frame") return droppedColumn_frame