sources.ended_events
Typed projection of bet365.ended_events. Casts the JSON data column into proper ClickHouse types (UInt32 / String / Date), normalises the short_score separator from : to -, and forwards the event_partition_key and extracted_at fields verbatim. Incremental + ReplacingMergeTree, partitioned by event_partition_key.
Lineage
Section titled “Lineage”flowchart LR raw[(bet365.ended_events)] --> me[/sources.ended_events/] me --> c1[/calculations.inplay_1_by_minute/] me --> c5[/calculations.matches_5_score/] me --> mart[/mart.matches/] click raw "/raw/ended_events/" "Open raw" click c1 "/calculations/inplay_1_by_minute/" "Open inplay_1_by_minute" click c5 "/calculations/matches_5_score/" "Open matches_5_score" click mart "/mart/matches/" "Open mart.matches"
Columns
Section titled “Columns”| Column | Description | Formula |
|---|---|---|
event_id | Unique identifier for the event. | data.id::UInt32 |
sport_id | Identifier for the sport category. | data.sport_id::UInt16 |
event_date | Event date (YYYY-MM-DD). | toDate(data.time::UInt32) |
event_partition_key | ClickHouse partition key. | passthrough from raw |
event_count | Total events for this event_date/sport_id (validation aid). | passthrough from raw |
time_status_id | Time status code (joined to seeds__time_status). | data.time_status::UInt8 |
league_id | League identifier. | data.league.id::UInt32 |
league_name | League name. | data.league.name::String |
league_country_code | ISO country code of the league. | data.league.cc::String |
team_home_id | Home-team identifier. | data.home.id::UInt32 |
team_home_name | Home-team name. | data.home.name::String |
team_home_image_id | Home-team logo image id. | toUInt32OrZero(toString(data.home.image_id)) |
team_home_country_code | Home-team ISO country code. | data.home.cc::String |
team_away_id | Away-team identifier. | data.away.id::UInt32 |
team_away_name | Away-team name. | data.away.name::String |
team_away_image_id | Away-team logo image id. | toUInt32OrZero(toString(data.away.image_id)) |
team_away_country_code | Away-team ISO country code. | data.away.cc::String |
short_score | Final score, normalised (H-A). | case … position(toString(data.ss),':') > 0 then replace(toString(data.ss), ':', '-') else toString(data.ss) end; ''/'null' mapped to NULL. |
round_id | Round identifier. | toUInt16OrZero(toString(data.round)) |
extracted_at | Crawl timestamp from the raw row. | passthrough |