Mapping Structure
Mappings in Machina Sports are defined in YAML format with the following structure:Real-World Examples
Sports Data Mapping
This example from our samples shows how to map soccer event data:Team Profile Mapping
This example maps NBA team profile data:Using Mappings in Workflows
Mappings are used in workflows as tasks to transform data:Common Mapping Patterns
Nested Data Extraction
Extract values from deeply nested JSON structures using JSONPath expressions.Field Renaming
Map fields from source format to differently named fields in the target format.Data Combination
Combine multiple source fields into a single target field (e.g., first_name + last_name → full_name).Default Values
Provide default values when source fields might be missing.Array Processing
Extract and transform elements from arrays in the source data.Best Practices
- Use descriptive mapping names that indicate the source and purpose
- Include proper error handling with default values for missing fields
- Keep mappings focused on a single data type or entity
- Test mappings with various data scenarios to ensure robustness
- Document complex transformations with comments
Next Steps
- Explore Connectors to understand available data sources
- Learn about Workflows to see how mappings are used in data processing
- Review Agents to understand how mapped data powers fan interactions