file:json:unchunk
Combines multiple JSON chunk files into a single array or map output file
Options
| Name | Type | Description |
|---|---|---|
input_files | []string | A list of input JSON files to process |
input_file_suffix | string | An optional suffix to append to the input files before processing |
output_file | string | Path 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_path | string | Is 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
| Name | Type | Description |
|---|---|---|
output_file | string | |
records | int |
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 }}"