Skip to content

I-ALiRT - Dynamodb addition - #949

Merged
laspsandoval merged 11 commits into
IMAP-Science-Operations-Center:devfrom
laspsandoval:dynamodb_addition
Oct 27, 2025
Merged

I-ALiRT - Dynamodb addition#949
laspsandoval merged 11 commits into
IMAP-Science-Operations-Center:devfrom
laspsandoval:dynamodb_addition

Conversation

@laspsandoval

@laspsandoval laspsandoval commented Oct 17, 2025

Copy link
Copy Markdown
Contributor

Change Summary

Overview

Add a parallel db table w/ new partition key and sort key.

Updated Files

  • ialirt_ingest_lambda_construct.py
    • Add new db table w/ partition key = instrument and sort key = met_in_utc
  • ialirt_ingest.py
    • Add new partition key “instrument” to kernel ingest
    • Update the insert function
    • Add capability to insert into new table (after the old table just in case there are any errors)

Testing

  • conftest.py
    • Add new database setup
  • test_ialirt_ingest_lambda_construct.py
    • test_ialirt_ingest.py

Notes

We will need to update our query apis and also archive api once this is approved and we begin to transition to the new database.

@laspsandoval
laspsandoval marked this pull request as draft October 17, 2025 21:53
@laspsandoval laspsandoval self-assigned this Oct 17, 2025
@laspsandoval
laspsandoval marked this pull request as ready for review October 17, 2025 22:35
@laspsandoval laspsandoval added this to the October 2025 milestone Oct 17, 2025

@greglucas greglucas left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I think this is a great approach to do it if I'm understanding correctly! You are creating a new table so that we can be inserting into both side-by-side in production. Then we'll test things out and maybe run a migration of previous items into the new table and only remove the original table if this approach is useful.

One thing that might be nice here is to try and be a bit more restrictive about what we are putting into each partition insert, so picking and choosing the instrument data appropriately based on the table name (the new table doesn't need an APID column for instance and we want mag_hk to be a separate instrument). I'm a bit confused if the HIT instrument insert is going to be inserted at a 4-second cadence or just one item in this new approach.

Comment thread sds_data_manager/constructs/ialirt_ingest_lambda_construct.py Outdated
Comment thread sds_data_manager/constructs/ialirt_ingest_lambda_construct.py Outdated
Comment thread tests/infrastructure/test_ialirt_ingest_lambda_construct.py Outdated
@laspsandoval
laspsandoval marked this pull request as draft October 18, 2025 20:54
@laspsandoval
laspsandoval marked this pull request as ready for review October 21, 2025 23:39
@laspsandoval

Copy link
Copy Markdown
Contributor Author

I made some pretty significant updates to ialirt_ingest.py. The rest is mostly the same (besides responding to the PR comments)

@greglucas greglucas left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the slow review here. A few more nitpicks / questions, but getting close!

Comment thread sds_data_manager/lambda_code/IAlirtCode/ialirt_ingest.py Outdated
Comment thread sds_data_manager/lambda_code/IAlirtCode/ialirt_ingest.py Outdated
Comment thread sds_data_manager/lambda_code/IAlirtCode/ialirt_ingest.py Outdated
Comment thread sds_data_manager/lambda_code/IAlirtCode/ialirt_ingest.py Outdated
Comment thread tests/lambda_endpoints/test_ialirt_ingest.py Outdated
Comment thread tests/lambda_endpoints/test_ialirt_ingest.py
@laspsandoval
laspsandoval merged commit 1fa28b3 into IMAP-Science-Operations-Center:dev Oct 27, 2025
2 checks passed
@laspsandoval
laspsandoval deleted the dynamodb_addition branch October 27, 2025 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants