DocsWorkflowsComponentsFilefile:json:unchunk

file:json:unchunk

Combines multiple JSON chunk files into a single array or map output file

Options

NameTypeDescription
input_files[]stringA list of input JSON files to process
input_file_suffixstringAn optional suffix to append to the input files before processing
output_filestringPath where the unchunked JSON will be saved It automatically determines the output file format (array or map) based on the input key path and the content
input_key_pathstringIs the path to the key in the JSON file that contains the array or a map of records It can be a dot-separated path to a nested key, e.g. "data.records" or "rows"

Outputs

NameTypeDescription
output_filestring
recordsint

Example

name: Reassemble JSON chunks into one array
actions:
  - name: joined
    component: file:json:unchunk
    vars:
      input_files:
        - part-1.json
        - part-2.json
      output_file: full.json
      input_key_path: items

outputs:
  file: "{{ joined.output_file }}"
  records: "{{ joined.records }}"