Skip to main content
The Insert To Children By Query command (Command Type: 1018) inserts data into child objects by selecting it from the command result using a JSONPath query and assigning it to a specified field name.

Overview

The Insert To Children By Query command provides functionality for:
  • Inserting a parent-level field into every child object
  • Using JSONPath to select which data to inject
  • Enriching child objects with data from a different level

Command Type

Command Type ID: 1018

Parameters

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

Usage Examples

Insert Parent ID into Children

{
  "command": "insert-to-children-by-query",
  "params": {
    "fieldName": "eventId",
    "query": "$.data.id"
  }
}

Insert Timestamp into Children

{
  "command": "insert-to-children-by-query",
  "params": {
    "fieldName": "collectedAt",
    "query": "$.data.timestamp"
  }
}

Common Use Cases

  • Parent-Child Enrichment: Inject a parent identifier (e.g. event ID) into each child record
  • Metadata Propagation: Attach parent-level metadata to nested child objects
  • Data Denormalization: Flatten hierarchical data for downstream sink commands