-
Notifications
You must be signed in to change notification settings - Fork 5
Description
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; and covidcast
at least uses the same header for every signal.