Concat
Concat Certified

Concatenate files from Kestra internal storage.

yaml
type: io.kestra.plugin.core.storage.Concat
yaml
    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'] }}"

yaml
    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'] }}"

yaml
    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('.[]') }}"

yaml
id: concat_example
namespace: company.team

tasks:
  - id: foreach
    type: io.kestra.plugin.core.flow.ForEach
    values: ["value1", "value2", "value3"]
    tasks:
      - id: start_api_call
        type: io.kestra.plugin.scripts.shell.Commands
        commands:
          - echo {{ taskrun.value }} > data.txt
        outputFiles:
          - data.txt

  - id: concat_foreach_manual
    type: io.kestra.plugin.core.storage.Concat
    files: "{{ outputs.start_api_call | jq('.[].outputFiles.generated') }}"
Properties
Default.tmp
Formaturi