Repository navigation
feat: backfill external signals - #46
Merged
Merged
Conversation
Long backfills sent every row in one statement, which fails past 32,767 bind parameters. Rows are now written in batches sized to stay under it. Co-authored-by: Vichu Selvaraju <vichuselvaraju@gmail.com>
AeroDataBox requests are paced, retry 429/5xx/network errors with backoff, and raise RateLimitedError once the quota is spent; delayed flights from the previous day are skipped. Weather archive requests go a year at a time so a failure only redoes that year. Co-authored-by: Vichu Selvaraju <vichuselvaraju@gmail.com>
Services fetch and upsert without committing; events yield after each month and flights after each day, so the scripts in scripts/backfill/ commit as they go and an interrupted run resumes where it stopped. The default window is a hotel's first and last stay_date in daily_performance. ingest/run.py's market helpers and migrate() are public for the scripts. Co-authored-by: narang-an <narang.an@northeastern.edu> Co-authored-by: Vichu Selvaraju <vichuselvaraju@gmail.com>
Co-authored-by: Vichu Selvaraju <vichuselvaraju@gmail.com>
selvarajuv
force-pushed
the
37-backfill-external-signals
branch
from
October 13, 2026 18:57
db7332f to
cbcf66c
Compare
selvarajuv
approved these changes
Oct 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds scripts to backfill weather and events data.
The flights API requires a subscription to be used we may have to look into another solution for getting both historical and future data for it, we could maybe use data from the free apis (opensky and cso) to check if it's worth getting flight data first before we decide to pay. The events api also requires a subscription so we backfilled as much as we could on the free plan.
Type of change
feat— new featurefix— bug fixdocs— documentation onlyrefactor— code change that neither fixes a bug nor adds a featureperf— performance improvementtest— adding or updating testschore/build/ci— tooling, deps, or pipeline changesChanges
Database migrations
just migrate-create "...")just migrate) and rolls back (just migrate-down)Checklist
just lint) and code is formatted (just format)just hooksinstalled).env.examplewhere relevantjust dev) and verified the API athttp://localhost:8000/docsHow to test
Notes for reviewers