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

Dynamic aggregations in Query #6

Open
NXXR opened this issue Dec 12, 2024 · 0 comments
Open

Dynamic aggregations in Query #6

NXXR opened this issue Dec 12, 2024 · 0 comments

Comments

@NXXR
Copy link
Collaborator

NXXR commented Dec 12, 2024

We decided on not storing aggregations in the DB, but dynamically compute them when requested for this we added the aggregations parameter to the infectiondata-query.

The query object should look like this:

{
  "aggregation1": [
    "Inf",
    "V2"
  ]
}

Where the first key is an arbitrary name for the aggregation that holds a list of compartment tags.
The backend querys the data and calculates the sum of all compartments containing the tags (AND connected).

The response will then contain datapoints with the aggregation name and no compartment.


FastAPI currently does not support deepObjects as query parameters but the feature is in planning.
When fastapi/fastapi#9867 is merged we can add in aggregations as deepObjects.

Alternatively a custom serialization may be possible, acting as a string query parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant