Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backfill Event Timestamp in Existing EVENT message files #205

Open
nicolemah99 opened this issue Nov 4, 2024 · 2 comments · May be fixed by #206
Open

Backfill Event Timestamp in Existing EVENT message files #205

nicolemah99 opened this issue Nov 4, 2024 · 2 comments · May be fixed by #206
Assignees

Comments

@nicolemah99
Copy link
Collaborator

nicolemah99 commented Nov 4, 2024

The event_timestamp field is now automatically added to message files during the download process. However, previously downloaded event files lack this timestamp. This task involves creating a script to backfill event_timestamp in these existing files.

  1. Unzip event files into temp dir
  2. Extract event_timestamp from *_metadata.yml.
  3. Insert event_timestamp into the message file.
  4. Remove temp dir
@nicolemah99 nicolemah99 self-assigned this Nov 4, 2024
@nicolemah99
Copy link
Collaborator Author

This is what the message file format should look like:

{
  "meter_id": "KOTZ-735-GEN_17",
  "event_id": "10251",
  "filename": "KEA-events-KOTZ-735-GEN_17-202411-10251.zip",
  "md5sum": "",
  "data_type": "events",
  "event_timestamp": "2024-11-02T17:38:37"
}

@nicolemah99
Copy link
Collaborator Author

Line to parse in EVENTID_metadata.yml (2nd line)

event_timestamp: "2024-10-23T06:15:56"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant