Skip to content

feat(dimensional): add dim_time for intraday time-of-day analysis #1981

@blarghmatey

Description

@blarghmatey

Context

PR #1868 established the core dimensional model schema including dim_date. Reviewer requested a time-of-day dimension to support intraday analytics.

What

Add a dim_time dimension table to complement dim_date for sub-daily analysis:

  • Grain: one row per minute (or second) of the day — 1,440 rows for minute-grain
  • Columns: time_key (integer HHMM or HHMMSS), hour, minute, second, am_pm, hour_of_day_label, time_of_day_bucket (morning/afternoon/evening/night), etc.
  • Fact tables with event timestamps (e.g., tfact_video_events, tfact_problem_events, tfact_chatbot_events) should gain a time_fk column

Acceptance Criteria

  • dim_time model created in src/ol_dbt/models/dimensional/
  • _dim_time.yml with PK uniqueness test and column documentation
  • time_fk added to relevant event fact tables
  • dbt test: PK unique, not_null, FK relationships valid

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions