Skip to content

docs: propose duplicate timeseries value handling - #1899

Open
krowvin wants to merge 3 commits into
developfrom
docs/1783-duplicate-timeseries-values-adr
Open

docs: propose duplicate timeseries value handling#1899
krowvin wants to merge 3 commits into
developfrom
docs/1783-duplicate-timeseries-values-adr

Conversation

@krowvin

@krowvin krowvin commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds ADR 0014 defining how CDA time-series write requests should handle multiple values that resolve to the same effective CWMS storage timestamp.

The ADR proposes a use-if-multiple API parameter with four strategies:

  • error — reject the request; this is the default
  • first — retain the first record
  • last — retain the last record
  • average — use the arithmetic mean of non-null values

The cwms-cli csv2cwms command already defines these options and handles them client-side. With this ADR, CDA can enforce the behavior at the backend, and csv2cwms can be updated to expose the methods provided by the API instead of resolving duplicates independently.
i.e.
https://cwms-cli.readthedocs.io/en/latest/cli/csv2cwms_complete_config.html#use-if-multiple

The ADR distinguishes collisions at the effective CWMS storage timestamp from optional rounding or bucketing into a time-series interval. It also records follow-up questions about interval bucketing, averaged quality codes, future data-entry-date handling, and resolution reporting.

This is an ADR-only pull request and makes no code changes.

Related Issue

Related to #1783

Validation

  • ./gradlew :docs:buildDocs
  • Confirmed the branch differs from develop only by the ADR and decision-index entry.
  • Integration tests were not run because this PR contains documentation only.

Checklist

  • AI tools used

Signed-off-by: Charles Graham, SWT <charles.r.graham@usace.army.mil>
Signed-off-by: Charles Graham, SWT <charles.r.graham@usace.army.mil>
Signed-off-by: Charles Graham, SWT <charles.r.graham@usace.army.mil>

@MikeNeilson MikeNeilson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks reasonable to me. We'll give time for others to comment.

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.

2 participants