Skip to content

Refactor meter score tables to match leaks/irrigation pattern#219

Merged
dmarulli merged 1 commit intomainfrom
meter-score-tables
Apr 30, 2026
Merged

Refactor meter score tables to match leaks/irrigation pattern#219
dmarulli merged 1 commit intomainfrom
meter-score-tables

Conversation

@dev-vicente-ferreyra
Copy link
Copy Markdown
Contributor

Replace CREATE OR REPLACE with CREATE TABLE IF NOT EXISTS + DELETE + INSERT for idempotency, and add a new meters_score_{org_id}_agg table grouped by class_full_name with array_agg of per-device scores and avg/stddev summaries.

Replace CREATE OR REPLACE with CREATE TABLE IF NOT EXISTS + DELETE + INSERT
for idempotency, and add a new meters_score_{org_id}_agg table grouped by
class_full_name with array_agg of per-device scores and avg/stddev summaries.
dmarulli
dmarulli approved these changes Apr 30, 2026
@dmarulli dmarulli merged commit 13a1e67 into main Apr 30, 2026
2 checks passed
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

Successfully merging this pull request may close these issues.

3 participants