Set endpoint fetch types using the SQL schemas directly? #229
Labels
enhancement
New feature or request
P2
low priority
triage
Should assign/revisit priority level, other tags
Milestone
Original suggestion
Is there a way to query the DB directly for schema info, e.g. with a helper fn or
schema
endpoint? SQL DESCRIBE looks simple and has the type info we want.Maybe we could parse the .sql files, e.g. have a script in the
epidatr
directory that generates a JSON file and the epidatr endpoints can read that. May be simpler to set up/touch fewer things and could always switch to the "schema" endpoint later (need to make sure the output format is the same).Note: Endpoint data is often split across multiple tables, so any approach would need to know how to combine across those.
Unclear if doing this in an automatic way is more or less work than maintaining specs manually in
epidatr
. Source headers shouldn't change often/fast -- most endpoints aren't adding new fields; many aren't even being updated anymore; andcovidcast
at least uses the same header for every signal.The text was updated successfully, but these errors were encountered: