sources.odds
Typed projection of bet365.odds, unfolded one row per (event, odd snapshot). The raw JSON array data.1_1 (full-time 1×2 odds) is exploded with array join, with each odd field pulled through its typed subcolumn (.:String) so missing keys come through as proper SQL NULLs instead of the ClickHouse ᴺᵁᴸᴸ marker. Filtered to minute_elapsed <= 180 to drop garbage rows. Incremental + ReplacingMergeTree, partitioned by event_partition_key.
Lineage
Section titled “Lineage”flowchart LR raw[(bet365.odds)] --> me[/sources.odds/] me --> c1[/calculations.inplay_1_by_minute/] me --> m1[/calculations.matches_1_odds_prematch/] click raw "/raw/odds/" "Open raw" click c1 "/calculations/inplay_1_by_minute/" "Open inplay_1_by_minute" click m1 "/calculations/matches_1_odds_prematch/" "Open matches_1_odds_prematch"
Columns
Section titled “Columns”| Column | Description | Formula |
|---|---|---|
key | Unique key for every event (passed through). | passthrough from raw |
event_id | Bet365 event identifier. | passthrough from raw |
event_date | Event date. | passthrough from raw |
event_partition_key | ClickHouse partition key. | passthrough from raw |
odd_id | Identifier of the unfolded odd snapshot. | ifNull(toUInt32OrZero(odd.id.:String), 0) |
minute_elapsed | Match minute the odd was recorded at. | toUInt32OrZero(odd.time_str.:String) |
short_score | Score string normalised to H-A, NULL when blank. | case when odd.ss.:String is null or odd.ss.:String = '' then null else replaceOne(odd.ss.:String, ':', '-') end |
home_odd | Home decimal odd; '-' mapped to NULL. | case when odd.home_od.:String = '-' then null else toFloat64OrNull(odd.home_od.:String) end |
draw_odd | Draw decimal odd; '-' mapped to NULL. | case when odd.draw_od.:String = '-' then null else toFloat64OrNull(odd.draw_od.:String) end |
away_odd | Away decimal odd; '-' mapped to NULL. | case when odd.away_od.:String = '-' then null else toFloat64OrNull(odd.away_od.:String) end |
is_in_play | 1 when this is an in-play snapshot (score present), 0 for prematch. | case when odd.ss.:String is null or odd.ss.:String = '' then 0 else 1 end |
odd_add_time | Server-time the odd was registered, as DateTime. | toDateTime(toUInt32OrZero(odd.add_time.:String)) |
extracted_at | Crawl timestamp from the raw row. | passthrough |