The KORE Data Model supports this integration. It provides a more user-friendly data structure which is designed for better reporting and analytics uses.
Overview
The MLB Stats API provides access to baseball data, stats, and other content for a wide variety of major and minor league professional baseball teams. This integration imports data from MLB Stats to KORE Data Warehouse daily.
Set up Instructions:
TEAM : provide the latest team_name/team_id to Success for which they want to activate the integration
Success: Create and prioritize a work item in the DWA backlog
DWA Developer: Setup integration and confirm data is loaded correctly
KORE: Notify the TEAM the integration has been configured, provide the user guide and a walk through of the integration
ERD and data dictionary
(This information is provided on a best-effort basis without guarantees. For clarity, some column names are omitted from this ERD.)
Mapping of API endpoints to DWA Tables
|
API Endpoint |
DWA Table Name |
|---|---|
|
game_data |
|
|
leagues |
|
|
schedules |
|
|
sports_directory |
|
|
teams |
|
|
venues |
Table descriptions
sports_directory: Lists all sports available via the API and details related to it.
league_data: League information for a specific sport, including start and end dates for the regular season and post-season.
schedule_data: Each record represents a match or event associated with a sport, league, and season.
team_data: Details about a team connected to a specific season.
venue_data: Venue details including location, timezone, etc.
game_data: Each record represents a specific game, including details like teams, time, and venue.
game_livedata: Contains Live Feed data for a specific game, such as team information, live play-by-play data, and player information. The information present in this table is captured from live data, specifically the 'All Play' array which contains details of each at-bat of the game.
Example queries
Show the details for all of a team's matches in the latest season:
SELECT s.date, s.gamepk, s.season, s.gamedate,
s.status_detailedstate, gd.venue_name, gd.gameinfo_attendance,
s.teams_away_team_name, s.teams_home_team_name, gd.teams_away_league_name,
gd.teams_away_division_name, gd.teams_away_clubname, gd.teams_away_parentorgname,
gd.teams_home_league_name, gd.teams_home_division_name, gd.teams_home_clubname,
gd.teams_home_parentorgname
FROM mlb_stats.schedules s
LEFT JOIN mlb_stats.game_data gd
ON s.gamepk = gd.game_pk
WHERE (s.teams_away_team_id = '123'OR s.teams_home_team_id = '123') -- Change ID
AND s.season = 2022 -- Change season
ORDER BY s.gamedate ASC;