Skip to content

Add channel aliasing, sinkless mode, sequence-of-events, column mapping#7

Merged
adefabian merged 9 commits into
mainfrom
feature/channel_mapping
May 8, 2026
Merged

Add channel aliasing, sinkless mode, sequence-of-events, column mapping#7
adefabian merged 9 commits into
mainfrom
feature/channel_mapping

Conversation

@adefabian
Copy link
Copy Markdown
Collaborator

@adefabian adefabian commented May 6, 2026

Summary

Adds channel aliasing for the KeyValueStoreSolver, plus four supporting changes:
per-table column-name mapping in solvers, an optional sinkless mode for Report,
a new SequenceOfEvents event type, and selector-aware batching in
Report.determine_report.

Changes

  • Channel aliasing: new QueryBuilder.channel_with_alias() and
    MeasurementDB.channel_mapping(); KeyValueStoreSolver resolves aliased
    selectors via a configurable channel_mapping table.
  • Selector identity: TimeSeriesSelector now exposes selector_id
    (CRC32) and get_selectors() on every node — used to drive batching and
    alias resolution.
  • Per-table column-name mapping: _apply_column_mapping lets each solver
    table (container_tags / container_metrics / channel_tags / channel_metrics
    / channel_mapping / channels) translate physical column names to internal
    ones at read time.
  • Sinkless Report: Report.sink is now Sink | None; persistence
    paths are guarded by _has_sink so a report can be built and solved
    without writing to UC.
  • SequenceOfEvents: new event type that joins overlapping consecutive
    intervals into one sequence.
  • Solver API: filter_channel_tags / filter_channel_metrics now take
    (spark, db, container_df, selectors) instead of (spark, query, …).
    Breaks any external solver subclasses.
  • Refactor: Report.determine_report orchestration extracted into
    mda_reporting.core.report_utils (also includes a Best-Fit-Decreasing
    bin-packer for selector-aware batching).

Test Plan

  • Unit tests added for channel aliasing, selector_id, sequence-of-events,
    column mapping, batching, and sinkless mode (~1500 lines new).
  • Manual testing completed (please confirm)
  • Documentation updated (if applicable) — N/A

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • No new linter warnings introduced

@adefabian adefabian requested a review from tombonfert May 6, 2026 12:56
@adefabian adefabian requested a review from a team as a code owner May 6, 2026 12:56
@tombonfert tombonfert changed the title Integrated channel mapping Add channel aliasing, sinkless mode, sequence-of-events, column mapping May 7, 2026
tombonfert
tombonfert previously approved these changes May 8, 2026
Copy link
Copy Markdown
Collaborator

@tombonfert tombonfert left a comment

Choose a reason for hiding this comment

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

LGTM. Please check if demo notebooks are still working.

Copy link
Copy Markdown
Collaborator

@tombonfert tombonfert left a comment

Choose a reason for hiding this comment

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

LGTM

@adefabian adefabian merged commit 36e1baa into main May 8, 2026
1 check passed
@adefabian adefabian deleted the feature/channel_mapping branch May 8, 2026 12:37
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