Skip to content

docs(wqp): investigate inconsistent wqp source values across layers (DIE-377) - #157

Merged
jirhiker merged 3 commits into
mainfrom
claude/loving-shannon-yvai8q
Nov 20, 2026
Merged

jirhiker merged 3 commits into
mainfrom
claude/loving-shannon-yvai8q

Conversation

@jirhiker

@jirhiker jirhiker commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Summary

Investigation for DIE-377. This adds docs/wqp-source-naming.md, which confirms the bug, maps each product layer to the source value it writes, recommends a fix, and lists proposed implementation tickets. There are no code changes.

Findings

  • Confirmed. WQPSiteTransformer writes WQP/<ProviderName>. WQPAnalyteTransformer and WQPWaterLevelTransformer write WQP, because ParameterTransformer._transform sets source from source_tag, not from site_record.source. WQP is the only connector where these two differ.
  • The 35 layers built from observation or summary records (summaries, timeseries, chemistry, hardness, water type, SAR, ion balance, MCL, WQI) get WQP.
  • The 17 layers built from site records (trends, recency, data density, water-level change and status, seasonal amplitude, depletion, correlation) get WQP/<provider>.
  • Feature IDs differ for the same well (WQP:<id> in one layer, WQP/NWIS:<id> in another), so joining layers on feature ID misses every WQP well.
  • No data is lost. Trend writers pair sites with observations by position, not by source.
  • The id keeps the reporting agency. It is WQP's MonitoringLocationIdentifier unchanged, which starts with the agency's code (USGS-323018103310702, 21NMEX-42RGRAND004.1).

Recommendation

Write source = "WQP" in every layer (option A in the doc). It matches the registry tag, makes a plain source=WQP filter work in every layer, and changes IDs only in the 17 site-derived layers.

Proposed implementation tickets

The doc lists six. Tickets 1–3 should ship together so the ID change happens once.

  1. fix(wqp): write source = "WQP" for WQP sites, and check real station IDs.
  2. test(connectors): site and observation source must match for every connector.
  3. docs(products): update the WQP source docs and add a release note for the ID change.
  4. chore(correlation): compare well-correlation output before and after ticket 1.
  5. investigate: USGS wells that appear twice, from WQP and from USGS-NWIS.
  6. investigate: WQP's legacy endpoints may not include USGS data added after March 11, 2024.

Testing

Doc-only change. I ran the three WQP transformers on a stub NWIS-provided station: the site record has source = WQP/NWIS and both observation records have WQP. The ID-prefix examples come from WQP's public station pages; waterqualitydata.us couldn't be reached from the session that wrote this.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RzW3FzinCc17iLNCUSiwc3

…DIE-377)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RzW3FzinCc17iLNCUSiwc3
@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Your pull request is automatically being deployed to Dagster Cloud.

Location Status Link Updated
die-orchestration View in Cloud Nov 19, 2026 at 10:08 PM (UTC)

… note (DIE-377)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RzW3FzinCc17iLNCUSiwc3
@jirhiker
jirhiker marked this pull request as ready for review November 18, 2026 23:06

@chasetmartin chasetmartin 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.

Makes sense. Please update the plan with a list of proposed implementation tickets (general) that I can use to populate the backlog for further refinement.

Comment thread docs/wqp-source-naming.md Resolved
Comment thread docs/wqp-source-naming.md Resolved
Comment thread docs/wqp-source-naming.md Resolved
…ckets (DIE-377)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RzW3FzinCc17iLNCUSiwc3

@chasetmartin chasetmartin 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.

lgtm, I will create Jira tickets based on this doc once merged.

@jirhiker
jirhiker merged commit 611c29a into main Nov 20, 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