Skip to content

Configurable break columns + persistent output tables#81

Merged
NewGraphEnvironment merged 1 commit intomainfrom
break-cols-persist
Apr 5, 2026
Merged

Configurable break columns + persistent output tables#81
NewGraphEnvironment merged 1 commit intomainfrom
break-cols-persist

Conversation

@NewGraphEnvironment
Copy link
Copy Markdown
Owner

Summary

  • col_blk/col_measure on break sources — configurable column names for stream ID and route measure. Defaults to FWA naming. Aliases to standard names on SELECT into breaks table.
  • BLK-based scoping replaces WSG scoping — filters break sources to blue_line_key IN (SELECT DISTINCT blue_line_key FROM {working_table}). Generic, no column name assumptions.
  • to_prefix persistencefrs_habitat(to_prefix = "fresh.streams") persists species tables. Run ADMS today, MORR tomorrow — both accumulate. Delete + insert per WSG for idempotent re-runs.
  • Removes aoi from frs_break_find table mode, .frs_scope_break_sources, .frs_table_has_col

Test plan

  • devtools::test() — 528 pass, 0 fail
  • to_prefix tested: ADMS then MORR, both WSGs in persistent tables
  • BLK scoping verified via test assertions

Fixes #79, #80
Relates to NewGraphEnvironment/sred-2025-2026#16

🤖 Generated with Claude Code

…istence

frs_break_find: configurable column names via col_blk and col_measure
(default blue_line_key/downstream_route_measure). Aliases to standard
names on SELECT. Replaces WSG-based scoping with BLK filter — only
inserts breaks whose blue_line_key exists in the working streams table.
Removes aoi from table mode (BLK filter handles scoping generically).

frs_habitat: add to_prefix param for persistent output tables. When
provided, INSERT results into {to_prefix}_{species} tables after
classification. Existing rows for the same WSG are replaced (delete +
insert). Run ADMS today, MORR tomorrow — both accumulate.

Removes .frs_scope_break_sources and .frs_table_has_col (no longer needed).

Fixes #80
Fixes #79

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@NewGraphEnvironment NewGraphEnvironment merged commit bf7f506 into main Apr 5, 2026
1 check passed
@NewGraphEnvironment NewGraphEnvironment deleted the break-cols-persist branch April 5, 2026 07:43
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.

Persistent output tables via frs_habitat(to=)

1 participant