Skip to content

Commit

Permalink
calculate snapshot_date from snapshotTimestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
SandhraSokhal committed Dec 5, 2024
1 parent ff66df1 commit bfc960e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/scripts/glue_jobs/certified_quiz_question_snapshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ def execute(self, dynamic_frame):
("changeType", "string", "change_type", "string"),
("snapshot.userId", "string", "change_user_id", "bigint"),
("snapshotTimestamp", "bigint", "snapshot_timestamp", "timestamp"),
# Note that we map the same timestamp into a bigint so that we can extract the partition date
("snapshotTimestamp", "bigint", "snapshot_date", "bigint"),
("stack", "string", "stack", "string"),
("instance", "string", "instance", "string"),
("snapshot.responseId", "int", "response_id", "bigint"),
Expand All @@ -57,7 +55,7 @@ def transform(dynamic_record):

dynamic_record["corrections"] = correctionInfo
# This is the partition date
dynamic_record[PARTITION_KEY] = Utils.ms_to_partition_date(dynamic_record[PARTITION_KEY])
dynamic_record[PARTITION_KEY] = Utils.ms_to_partition_date(dynamic_record["snapshotTimestamp"])
return dynamic_record


Expand Down

0 comments on commit bfc960e

Please sign in to comment.