airqo-platform / airqo-platform/AirQo-api
No per-device/site breakdown when a data-download request spans multiple devices
- 主要言語
- JavaScript
- スター
- 26
- フォーク
- 24
- 平均マージ
- 5時間 36分
- マージ済み PR(30日)
- 81
説明
# No per-device/site breakdown when a data-download request spans multiple devices
## Summary
`get_validated_filter` accepts a single filter list (`sites` OR `device_ids` OR `device_names`), and BigQuery returns one flat result set tagged by `device_name`/`site_id`. Nothing in the response indicates which *requested* devices came back with zero rows — the client has to diff returned rows against its own request list, which it doesn't currently do. This is the root cause behind frontend reports of "half my devices have no data and I can't tell which ones."
## Where this came from
Baalmart, following up on AirQo-frontend PR #3876's data-download review, tracing the request path in `src/analytics`.
## Affected code
- `get_validated_filter` — `data_formatters.py:337`
- BigQuery response construction — `bigquery_api.py:488-495`
- `data_ops.py:97-99`
## Suggested fix
Include a per-device/site breakdown in the response — e.g. `devices_with_data` / `devices_without_data` lists, or a row count per requested identifier — alongside the flat data array, so the client doesn't have to infer it.
## Acceptance criteria
- [ ] Multi-device/site data-download responses indicate which requested identifiers returned zero rows
- [ ] Frontend can surface a "3 of 5 selected devices returned data" style message without client-side diffing
コントリビューションガイド
評価
この issue はまだ評価されていません。