Skip to content
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

Set endpoint fetch types using the SQL schemas directly? #229

Open
nmdefries opened this issue Dec 7, 2023 · 0 comments
Open

Set endpoint fetch types using the SQL schemas directly? #229

nmdefries opened this issue Dec 7, 2023 · 0 comments
Labels
enhancement New feature or request P2 low priority triage Should assign/revisit priority level, other tags

Comments

@nmdefries
Copy link
Contributor

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; and covidcast at least uses the same header for every signal.

@nmdefries nmdefries added enhancement New feature or request P2 low priority triage Should assign/revisit priority level, other tags labels Dec 7, 2023
@dsweber2 dsweber2 added this to the Z: epidatr & epidatpy milestone Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P2 low priority triage Should assign/revisit priority level, other tags
Projects
None yet
Development

No branches or pull requests

2 participants