
Storage Concat
CertifiedConcatenate files from Kestra internal storage.
Storage Concat
Concatenate files from Kestra internal storage.
Reads a list of kestra:// URIs (list or JSON string), streams them in order into a single file, and returns the new URI. Optional separator is inserted between files; output extension defaults to .tmp.
Use when you need to merge task outputs without downloading locally.
type: io.kestra.plugin.core.storage.ConcatExamples
Concat a 2 files.
id: concat_example
namespace: company.team
tasks:
- id: first_file
type: io.kestra.plugin.scripts.shell.Commands
commands:
- echo "Hello John" > name.txt
outputFiles:
- "name.txt"
- id: second_file
type: io.kestra.plugin.scripts.shell.Commands
commands:
- echo "Hello Jane" > name.txt
outputFiles:
- "name.txt"
- id: concat
type: io.kestra.plugin.core.storage.Concat
files:
- "{{ outputs.first_file.outputFiles['name.txt'] }}"
- "{{ outputs.second_file.outputFiles['name.txt'] }}"
Concat 2 files with a custom separator that adds a new line between each file.
id: concat_example
namespace: company.team
tasks:
- id: first_file
type: io.kestra.plugin.scripts.shell.Commands
commands:
- echo "Hello John
Goodbye John" > name.txt
outputFiles:
- "name.txt"
- id: second_file
type: io.kestra.plugin.scripts.shell.Commands
commands:
- echo "Hello Jane
GoodbyeJane" > name.txt
outputFiles:
- "name.txt"
- id: concat
type: io.kestra.plugin.core.storage.Concat
separator: "
"
files:
- "{{ outputs.first_file.outputFiles['name.txt'] }}"
- "{{ outputs.second_file.outputFiles['name.txt'] }}"
Concat a dynamic number of files.
id: concat_example
namespace: company.team
tasks:
- id: generate_files
type: io.kestra.plugin.scripts.shell.Commands
commands:
- echo "Hello John" > 1.txt
- echo "Hello Jane" > 2.txt
- echo "Hello Doe" > 3.txt
outputFiles:
- "*.txt"
- id: concat
type: io.kestra.plugin.core.storage.Concat
files: "{{ outputs.generate_files.outputFiles | jq('.[]') }}"
Concat files generated by a Loop task.
id: concat_example
namespace: company.team
tasks:
- id: loop
type: io.kestra.plugin.core.flow.Loop
values: ["value1", "value2", "value3"]
outputs:
- id: file
type: STRING
value: "{{outputs.start_api_call.outputFiles['data.txt']}}"
tasks:
- id: start_api_call
type: io.kestra.plugin.scripts.shell.Commands
commands:
- echo {{ item.value }} > data.txt
outputFiles:
- data.txt
- id: concat_foreach_manual
type: io.kestra.plugin.core.storage.Concat
files: "{{ outputs.loop.outputs | jq('.[].outputs.file') }}"
Properties
files *object
List of files to be concatenated
Must be kestra:// storage URIs; it can be a list of strings or a JSON string.
Pebble expression referencing an Internal Storage URI e.g. {{ outputs.mytask.uri }}.
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150extension string
.tmpThe extension of the created file — the default is .tmp
separator string
The separator to used between files — the default is no separator
Outputs
uri string
uriThe concatenated file URI