Skip to main content
The Insert To Children By Query List command (Command Type: 1021) inserts multiple fields into child objects by applying a list of query-and-field-name pairs. Each pair is applied in order to all children.

Overview

The Insert To Children By Query List command provides functionality for:
  • Inserting multiple fields into child objects in a single command
  • Applying each query-field pair sequentially to all children
  • Reducing pipeline complexity when multiple parent fields need to be injected

Command Type

Command Type ID: 1021

Parameters

ParameterTypeDescriptionRequired
queriesArray of InsertToChildrenByQueryParamsList of insert-to-children-by-query param objects, each applied in order to all childrenYes

InsertToChildrenByQueryParams

FieldTypeDescriptionRequired
fieldNamestringThe name of the field to insert the data intoYes
querystringJSONPath query to select the data from commandResultYes

Usage Examples

Insert Multiple Parent Fields

{
  "command": "insert-to-children-by-query-list",
  "params": {
    "queries": [
      {
        "fieldName": "eventId",
        "query": "$.data.id"
      },
      {
        "fieldName": "sportId",
        "query": "$.data.sportId"
      },
      {
        "fieldName": "leagueId",
        "query": "$.data.leagueId"
      }
    ]
  }
}

Insert Metadata and Timestamp

{
  "command": "insert-to-children-by-query-list",
  "params": {
    "queries": [
      {
        "fieldName": "source",
        "query": "$.data.provider"
      },
      {
        "fieldName": "collectedAt",
        "query": "$.data.timestamp"
      }
    ]
  }
}

Common Use Cases

  • Bulk Enrichment: Inject multiple parent-level identifiers into child records in one step
  • Data Denormalization: Flatten hierarchical data with multiple parent attributes
  • Pipeline Simplification: Replace multiple sequential Insert To Children By Query commands with one