Skip to content

Conversation

@borodark
Copy link
Owner

@borodark borodark commented Dec 26, 2025

PR: Default Pre-Aggregations (Opt-In)

Overview

  • Adds an opt-in default pre-aggregation for auto-generated cubes when updated_at exists.
  • Prints the pre-aggregation block in the auto-generated Elixir snippet.
  • Enforces a consistent pre-aggregation name suffix: _automatic_for_the_people.
  • Adds Cube HTTP integration coverage across date granularities/ranges.
  • Documents the new flag in README and quick reference.

What’s New

  • default_pre_aggregation: true generates a single rollup pre-aggregation.
  • Rollup defaults:
    • external: true
    • time_dimension: :updated_at
    • granularity: :hour
    • refresh_key: SELECT MAX(id) FROM <sql_table>
    • build_range_start/end based on NOW()
    • excludes updated_at and inserted_at from dimensions
  • Printed cube snippet now shows the pre-aggregation block (suppressed when sql_table is unknown).

Testing

mix test test/power_of_three/default_cube_test.exs
mix test test/power_of_three/preagg_default_integration_test.exs --include live_cube

Notes

  • Fully backward compatible.
  • Pre-aggregation remains editable after generation.
  • ADBC Client to support Explorer.DataFrame

Pending integration of two forks:

@borodark borodark changed the title Arrow server tests DataFrame from ADBC Client of Cube Dec 29, 2025
@borodark borodark marked this pull request as ready for review December 29, 2025 23:40
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