-
Notifications
You must be signed in to change notification settings - Fork 15
I-ALiRT - Archive cadence #1038
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
base: dev
Are you sure you want to change the base?
I-ALiRT - Archive cadence #1038
Conversation
| all_items.extend(inst_items) | ||
|
|
||
| dataset = create_xarray_from_records(response["Items"]) | ||
| dataset = create_xarray_from_records(all_items) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this handle an empty dataset? If we don't get any ialirt packets for a day, would this still create all the expected fields with empty fill values, or do we need to exit out earlier above this so we don't write an empty file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Addressed that empty dataset now.
| INSTRUMENTS = ["mag", "codice_lo", "codice_hi", "hit", "swe", "swapi", "spacecraft"] | ||
|
|
||
|
|
||
| def query_instrument( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we already have this in the main API-route? I feel like we should be using the same query function in both places so we don't get out of sync.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ialirt_ingest.py queries S3 (packet filenames).
ialirt_data_query_api.py queries DynamoDB, but does not paginate.
This archive lambda needs to pull all items in a time window (1 day), so pagination is required.
f45e5d2 to
8d2e629
Compare
Change Summary
Overview
Pass in new database, handle pagination, update time to be exactly at midnight
Updated Files
Testing