{"database": "football", "private": false, "path": "/football", "size": 654422016, "tables": [{"name": "audit_log", "columns": ["audit_id", "timestamp", "operator_id", "run_id", "table_name", "record_pk", "action", "column_name", "old_value", "new_value", "reason"], "primary_keys": ["audit_id"], "count": 0, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": [{"other_table": "ingestion_run", "column": "run_id", "other_column": "run_id"}, {"other_table": "operator", "column": "operator_id", "other_column": "operator_id"}]}, "private": false}, {"name": "competition", "columns": ["competition_id", "name", "slug", "type", "region", "tier", "is_active", "created_at", "updated_at", "created_by_run_id", "updated_by_run_id", "source_id", "source_raw_key"], "primary_keys": ["competition_id"], "count": 205, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [{"other_table": "season", "column": "competition_id", "other_column": "competition_id"}, {"other_table": "elo_record", "column": "competition_id", "other_column": "competition_id"}, {"other_table": "form_record", "column": "competition_id", "other_column": "competition_id"}, {"other_table": "h2h_record", "column": "competition_id", "other_column": "competition_id"}], "outgoing": [{"other_table": "data_source", "column": "source_id", "other_column": "source_id"}, {"other_table": "ingestion_run", "column": "updated_by_run_id", "other_column": "run_id"}, {"other_table": "ingestion_run", "column": "created_by_run_id", "other_column": "run_id"}]}, "private": false}, {"name": "data_source", "columns": ["source_id", "name", "slug", "base_url", "description", "is_active", "created_at"], "primary_keys": ["source_id"], "count": 13, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [{"other_table": "ingestion_run", "column": "source_id", "other_column": "source_id"}, {"other_table": "team", "column": "source_id", "other_column": "source_id"}, {"other_table": "competition", "column": "source_id", "other_column": "source_id"}, {"other_table": "team_alias", "column": "source_id", "other_column": "source_id"}, {"other_table": "season", "column": "source_id", "other_column": "source_id"}, {"other_table": "player", "column": "source_id", "other_column": "source_id"}, {"other_table": "match", "column": "source_id", "other_column": "source_id"}, {"other_table": "elo_record", "column": "source_id", "other_column": "source_id"}, {"other_table": "form_record", "column": "source_id", "other_column": "source_id"}, {"other_table": "h2h_record", "column": "source_id", "other_column": "source_id"}, {"other_table": "match_stats", "column": "source_id", "other_column": "source_id"}, {"other_table": "match_event", "column": "source_id", "other_column": "source_id"}, {"other_table": "odds", "column": "source_id", "other_column": "source_id"}, {"other_table": "player_match", "column": "source_id", "other_column": "source_id"}], "outgoing": []}, "private": false}, {"name": "elo_record", "columns": ["elo_id", "team_id", "date", "rating", "k_factor", "delta", "source_match_id", "is_tournament", "competition_id", "created_at", "updated_at", "created_by_run_id", "updated_by_run_id", "source_id", "source_raw_key"], "primary_keys": ["elo_id"], "count": null, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": [{"other_table": "competition", "column": "competition_id", "other_column": "competition_id"}, {"other_table": "data_source", "column": "source_id", "other_column": "source_id"}, {"other_table": "match", "column": "source_match_id", "other_column": "match_id"}, {"other_table": "team", "column": "team_id", "other_column": "team_id"}]}, "private": false}, {"name": "form_record", "columns": ["form_id", "team_id", "date", "window_matches", "pts_avg", "gf_avg", "ga_avg", "xg_for_avg", "xg_against_avg", "win_pct", "draw_pct", "loss_pct", "competition_id", "created_at", "updated_at", "created_by_run_id", "updated_by_run_id", "source_id", "source_raw_key"], "primary_keys": ["form_id"], "count": null, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": [{"other_table": "competition", "column": "competition_id", "other_column": "competition_id"}, {"other_table": "data_source", "column": "source_id", "other_column": "source_id"}, {"other_table": "team", "column": "team_id", "other_column": "team_id"}]}, "private": false}, {"name": "h2h_record", "columns": ["h2h_id", "team_a_id", "team_b_id", "date", "total_matches", "wins_a", "wins_b", "draws", "goals_a", "goals_b", "last_match_date", "last_result", "last_match_id", "competition_id", "created_at", "updated_at", "created_by_run_id", "updated_by_run_id", "source_id", "source_raw_key"], "primary_keys": ["h2h_id"], "count": null, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": [{"other_table": "competition", "column": "competition_id", "other_column": "competition_id"}, {"other_table": "match", "column": "last_match_id", "other_column": "match_id"}, {"other_table": "data_source", "column": "source_id", "other_column": "source_id"}, {"other_table": "team", "column": "team_b_id", "other_column": "team_id"}, {"other_table": "team", "column": "team_a_id", "other_column": "team_id"}]}, "private": false}, {"name": "ingestion_run", "columns": ["run_id", "source_id", "operator_id", "target_table", "status", "raw_file_path", "api_endpoint", "checksum_md5", "rows_inserted", "rows_updated", "rows_skipped", "rows_failed", "started_at", "ended_at", "duration_ms", "extra"], "primary_keys": ["run_id"], "count": 24, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [{"other_table": "audit_log", "column": "run_id", "other_column": "run_id"}, {"other_table": "team", "column": "run_id", "other_column": "updated_by_run_id"}, {"other_table": "team", "column": "run_id", "other_column": "created_by_run_id"}, {"other_table": "competition", "column": "run_id", "other_column": "updated_by_run_id"}, {"other_table": "competition", "column": "run_id", "other_column": "created_by_run_id"}, {"other_table": "team_alias", "column": "run_id", "other_column": "updated_by_run_id"}, {"other_table": "team_alias", "column": "run_id", "other_column": "created_by_run_id"}, {"other_table": "season", "column": "run_id", "other_column": "updated_by_run_id"}, {"other_table": "season", "column": "run_id", "other_column": "created_by_run_id"}, {"other_table": "player", "column": "run_id", "other_column": "updated_by_run_id"}, {"other_table": "player", "column": "run_id", "other_column": "created_by_run_id"}, {"other_table": "match", "column": "run_id", "other_column": "updated_by_run_id"}, {"other_table": "match", "column": "run_id", "other_column": "created_by_run_id"}, {"other_table": "match_stats", "column": "run_id", "other_column": "updated_by_run_id"}, {"other_table": "match_stats", "column": "run_id", "other_column": "created_by_run_id"}, {"other_table": "match_event", "column": "run_id", "other_column": "updated_by_run_id"}, {"other_table": "match_event", "column": "run_id", "other_column": "created_by_run_id"}, {"other_table": "odds", "column": "run_id", "other_column": "updated_by_run_id"}, {"other_table": "odds", "column": "run_id", "other_column": "created_by_run_id"}, {"other_table": "player_match", "column": "run_id", "other_column": "updated_by_run_id"}, {"other_table": "player_match", "column": "run_id", "other_column": "created_by_run_id"}], "outgoing": [{"other_table": "operator", "column": "operator_id", "other_column": "operator_id"}, {"other_table": "data_source", "column": "source_id", "other_column": "source_id"}]}, "private": false}, {"name": "match", "columns": ["match_id", "season_id", "date", "kickoff", "home_team_id", "away_team_id", "home_score", "away_score", "result", "round_stage", "matchday", "venue", "city", "country", "referee", "attendance", "is_neutral", "is_postponed", "is_cancelled", "created_at", "updated_at", "created_by_run_id", "updated_by_run_id", "source_id", "source_raw_key"], "primary_keys": ["match_id"], "count": 101682, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [{"other_table": "elo_record", "column": "match_id", "other_column": "source_match_id"}, {"other_table": "h2h_record", "column": "match_id", "other_column": "last_match_id"}, {"other_table": "match_stats", "column": "match_id", "other_column": "match_id"}, {"other_table": "match_event", "column": "match_id", "other_column": "match_id"}, {"other_table": "odds", "column": "match_id", "other_column": "match_id"}, {"other_table": "player_match", "column": "match_id", "other_column": "match_id"}], "outgoing": [{"other_table": "ingestion_run", "column": "updated_by_run_id", "other_column": "run_id"}, {"other_table": "ingestion_run", "column": "created_by_run_id", "other_column": "run_id"}, {"other_table": "data_source", "column": "source_id", "other_column": "source_id"}, {"other_table": "team", "column": "away_team_id", "other_column": "team_id"}, {"other_table": "team", "column": "home_team_id", "other_column": "team_id"}, {"other_table": "season", "column": "season_id", "other_column": "season_id"}]}, "private": false}, {"name": "match_event", "columns": ["event_id", "match_id", "event_type", "minute", "minute_extra", "half", "team_id", "player_id", "player2_id", "detail", "xg_value", "description", "created_at", "updated_at", "created_by_run_id", "updated_by_run_id", "source_id", "source_raw_key"], "primary_keys": ["event_id"], "count": 15848, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": [{"other_table": "data_source", "column": "source_id", "other_column": "source_id"}, {"other_table": "ingestion_run", "column": "updated_by_run_id", "other_column": "run_id"}, {"other_table": "ingestion_run", "column": "created_by_run_id", "other_column": "run_id"}, {"other_table": "player", "column": "player2_id", "other_column": "player_id"}, {"other_table": "player", "column": "player_id", "other_column": "player_id"}, {"other_table": "team", "column": "team_id", "other_column": "team_id"}, {"other_table": "match", "column": "match_id", "other_column": "match_id"}]}, "private": false}, {"name": "match_stats", "columns": ["match_stats_id", "match_id", "possession_home", "possession_away", "ppda_home", "ppda_away", "shots_home", "shots_away", "shots_on_target_home", "shots_on_target_away", "shots_blocked_home", "shots_blocked_away", "big_chances_home", "big_chances_away", "big_chances_missed_home", "big_chances_missed_away", "xg_home", "xg_away", "npxg_home", "npxg_away", "total_passes_home", "total_passes_away", "pass_accuracy_home", "pass_accuracy_away", "key_passes_home", "key_passes_away", "corners_home", "corners_away", "free_kicks_home", "free_kicks_away", "yellow_cards_home", "yellow_cards_away", "red_cards_home", "red_cards_away", "fouls_home", "fouls_away", "offsides_home", "offsides_away", "saves_home", "saves_away", "created_at", "updated_at", "created_by_run_id", "updated_by_run_id", "source_id", "source_raw_key"], "primary_keys": ["match_stats_id"], "count": 11763, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": [{"other_table": "data_source", "column": "source_id", "other_column": "source_id"}, {"other_table": "ingestion_run", "column": "updated_by_run_id", "other_column": "run_id"}, {"other_table": "ingestion_run", "column": "created_by_run_id", "other_column": "run_id"}, {"other_table": "match", "column": "match_id", "other_column": "match_id"}]}, "private": false}, {"name": "odds", "columns": ["odds_id", "match_id", "bookmaker", "market", "selection", "value", "value_open", "implied_probability", "recorded_at", "is_closing", "created_at", "updated_at", "created_by_run_id", "updated_by_run_id", "source_id", "source_raw_key"], "primary_keys": ["odds_id"], "count": 435912, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": [{"other_table": "data_source", "column": "source_id", "other_column": "source_id"}, {"other_table": "ingestion_run", "column": "updated_by_run_id", "other_column": "run_id"}, {"other_table": "ingestion_run", "column": "created_by_run_id", "other_column": "run_id"}, {"other_table": "match", "column": "match_id", "other_column": "match_id"}]}, "private": false}, {"name": "operator", "columns": ["operator_id", "name", "email", "operator_type", "description", "created_at"], "primary_keys": ["operator_id"], "count": 3, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [{"other_table": "ingestion_run", "column": "operator_id", "other_column": "operator_id"}, {"other_table": "audit_log", "column": "operator_id", "other_column": "operator_id"}], "outgoing": []}, "private": false}, {"name": "player", "columns": ["player_id", "full_name", "display_name", "date_of_birth", "nationality", "position", "foot", "height_cm", "weight_kg", "current_team_id", "is_active", "created_at", "updated_at", "created_by_run_id", "updated_by_run_id", "source_id", "source_raw_key"], "primary_keys": ["player_id"], "count": 38279, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [{"other_table": "player_season", "column": "player_id", "other_column": "player_id"}, {"other_table": "match_event", "column": "player_id", "other_column": "player2_id"}, {"other_table": "match_event", "column": "player_id", "other_column": "player_id"}, {"other_table": "player_match", "column": "player_id", "other_column": "player_id"}], "outgoing": [{"other_table": "data_source", "column": "source_id", "other_column": "source_id"}, {"other_table": "ingestion_run", "column": "updated_by_run_id", "other_column": "run_id"}, {"other_table": "ingestion_run", "column": "created_by_run_id", "other_column": "run_id"}, {"other_table": "team", "column": "current_team_id", "other_column": "team_id"}]}, "private": false}, {"name": "player_match", "columns": ["player_match_id", "match_id", "player_id", "team_id", "minutes_played", "is_starter", "is_substituted_out", "is_substituted_in", "goals", "assists", "own_goals", "penalties_scored", "penalties_missed", "xg", "npxg", "xa", "key_passes", "big_chances_created", "big_chances_missed", "total_passes", "accurate_passes", "pass_accuracy", "progressive_passes", "tackles", "interceptions", "clearances", "aerial_duels_won", "ground_duels_won", "fouls_committed", "fouls_drawn", "yellow_card", "red_card", "saves", "goals_conceded", "clean_sheet", "rating", "created_at", "updated_at", "created_by_run_id", "updated_by_run_id", "source_id", "source_raw_key"], "primary_keys": ["player_match_id"], "count": null, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": [{"other_table": "data_source", "column": "source_id", "other_column": "source_id"}, {"other_table": "ingestion_run", "column": "updated_by_run_id", "other_column": "run_id"}, {"other_table": "ingestion_run", "column": "created_by_run_id", "other_column": "run_id"}, {"other_table": "team", "column": "team_id", "other_column": "team_id"}, {"other_table": "player", "column": "player_id", "other_column": "player_id"}, {"other_table": "match", "column": "match_id", "other_column": "match_id"}]}, "private": false}, {"name": "player_season", "columns": ["player_id", "team_id", "season_name", "apps", "goals", "assists", "minutes", "created_at", "updated_at"], "primary_keys": ["player_id", "team_id", "season_name"], "count": null, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": [{"other_table": "team", "column": "team_id", "other_column": "team_id"}, {"other_table": "player", "column": "player_id", "other_column": "player_id"}]}, "private": false}, {"name": "player_season_stats", "columns": ["player_id", "team_id", "season_name", "apps", "goals", "assists", "minutes", "shots", "cards", "xg", "created_at", "updated_at"], "primary_keys": ["player_id", "team_id", "season_name"], "count": 1328, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}, {"name": "season", "columns": ["season_id", "competition_id", "season_name", "start_date", "end_date", "is_active", "teams_expected", "created_at", "updated_at", "created_by_run_id", "updated_by_run_id", "source_id", "source_raw_key"], "primary_keys": ["season_id"], "count": 2084, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [{"other_table": "match", "column": "season_id", "other_column": "season_id"}], "outgoing": [{"other_table": "data_source", "column": "source_id", "other_column": "source_id"}, {"other_table": "ingestion_run", "column": "updated_by_run_id", "other_column": "run_id"}, {"other_table": "ingestion_run", "column": "created_by_run_id", "other_column": "run_id"}, {"other_table": "competition", "column": "competition_id", "other_column": "competition_id"}]}, "private": false}, {"name": "team", "columns": ["team_id", "name", "short_name", "country_code", "continent", "team_type", "founded_year", "is_active", "created_at", "updated_at", "created_by_run_id", "updated_by_run_id", "source_id", "source_raw_key"], "primary_keys": ["team_id"], "count": 1299, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [{"other_table": "team_alias", "column": "team_id", "other_column": "team_id"}, {"other_table": "player", "column": "team_id", "other_column": "current_team_id"}, {"other_table": "match", "column": "team_id", "other_column": "away_team_id"}, {"other_table": "match", "column": "team_id", "other_column": "home_team_id"}, {"other_table": "elo_record", "column": "team_id", "other_column": "team_id"}, {"other_table": "form_record", "column": "team_id", "other_column": "team_id"}, {"other_table": "h2h_record", "column": "team_id", "other_column": "team_b_id"}, {"other_table": "h2h_record", "column": "team_id", "other_column": "team_a_id"}, {"other_table": "player_season", "column": "team_id", "other_column": "team_id"}, {"other_table": "match_event", "column": "team_id", "other_column": "team_id"}, {"other_table": "player_match", "column": "team_id", "other_column": "team_id"}], "outgoing": [{"other_table": "data_source", "column": "source_id", "other_column": "source_id"}, {"other_table": "ingestion_run", "column": "updated_by_run_id", "other_column": "run_id"}, {"other_table": "ingestion_run", "column": "created_by_run_id", "other_column": "run_id"}]}, "private": false}, {"name": "team_alias", "columns": ["alias_id", "team_id", "raw_name", "source_id", "confidence", "created_at", "updated_at", "created_by_run_id", "updated_by_run_id", "source_raw_key"], "primary_keys": ["alias_id"], "count": 1290, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": [{"other_table": "ingestion_run", "column": "updated_by_run_id", "other_column": "run_id"}, {"other_table": "ingestion_run", "column": "created_by_run_id", "other_column": "run_id"}, {"other_table": "data_source", "column": "source_id", "other_column": "source_id"}, {"other_table": "team", "column": "team_id", "other_column": "team_id"}]}, "private": false}, {"name": "team_season_stats", "columns": ["team_id", "season_name", "goals_for", "goals_against", "avg_possession", "xg_for", "xg_against", "points", "matches", "created_at", "updated_at"], "primary_keys": ["team_id", "season_name"], "count": 831, "hidden": false, "fts_table": null, "foreign_keys": {"incoming": [], "outgoing": []}, "private": false}], "hidden_count": 0, "views": [], "queries": [{"sql": "SELECT m.match_id, t1.name AS home, t2.name AS away, m.home_score || ' - ' || m.away_score AS score, m.date, s.season_name, c.name AS competition FROM match m JOIN team t1 ON m.home_team_id = t1.team_id JOIN team t2 ON m.away_team_id = t2.team_id JOIN season s ON m.season_id = s.season_id JOIN competition c ON s.competition_id = c.competition_id ORDER BY m.date DESC LIMIT 100", "name": "view_matches", "private": false}], "allow_execute_sql": true, "query_ms": 83.23303097859025}