Overview
The Insert To Children command provides functionality for:- Selecting parent objects with a JSONPath query
- Selecting child objects within each parent with a JSONPath query
- Copying specific parent attributes into each child object using mapping rules
Command Type
Command Type ID: 1013Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| query | string | JSONPath query to select parent objects from the data attribute | Yes |
| keyChildren | string | JSONPath query to select child objects from each parent | Yes |
| mapping | Array of KeyMapping | Defines how parent attributes are copied to child objects | Yes |
KeyMapping
| Field | Type | Description | Required |
|---|---|---|---|
| to | string | The new key to which the extracted value will be assigned | Yes |
| from | string | A JSONPath query string to extract the value from the parent | No |
Usage Examples
Insert Event Fields into Markets
Insert League Info into Fixtures
Common Use Cases
- Hierarchy Flattening: Propagate parent identifiers into nested children
- Data Enrichment: Attach parent context to child records for downstream processing
- Denormalization: Combine parent and child fields into flat records for sink commands
Related Commands
- Insert To Children By Query - Insert a single field using a query
- Insert To Children By Query List - Insert multiple fields at once
- Key Mapping - Remap object keys