Aller au contenu principal

Merge

Category: Transform
Node id: merge

Merges multiple data sources into one using object merge, array merge with dedup, or array concatenation

What it does​

  • Three merge modes: object merge, array merge with dedup, array concatenation
  • Deduplication during array merging
  • Source count tracking for audit
  • Last-write-wins semantics for object key conflicts

Use cases​

  • Combine patient data from multiple FHIR servers
  • Merge clinical observations from different time periods
  • Concatenate results from parallel pipeline branches

Runtime​

  • Performance tier: fast

Input ports​

NameTypeRequiredDescription
inputjsonYesData sources to merge (multiple named inputs)

Output ports​

NameTypeRequiredDescription
resultjsonNoMerge result: merged data plus count, field_count, and source_count metadata
successbooleanNoWhether the merge operation completed without error

Settings​

Basic​

SettingNameTypeRequiredDefaultAllowed valuesDescription
Merge Typemerge_typeenumYesobjectobject, array, concatHow to merge the data sources
SourcessourcesarrayNoList of input keys to merge (required for array and concat types)

Errors​

CodeDescription
UNSUPPORTED_MERGE_TYPEThe specified merge_type is not recognized
NO_SOURCESNo source data available to merge

Runtime notes​

  • The merged data is inside result.merged, NOT at result top level. Downstream nodes must read result.merged.
  • Object merge uses last-write-wins for key conflicts — if two sources have the same key, the later source's value wins.
  • Array merge deduplicates by string representation (fmt.Sprintf); concat mode keeps all items including duplicates.
  • If sources config is omitted for object merge, ALL inputs are merged (each input key becomes a top-level key in merged).

See Build any workflow for how to put nodes together and Ports, types and data flow for how port types connect.

Quelque chose n'est pas clair ? Envoyez vos commentaires sur la documentation par courriel.