Package io.kestra.core.tasks.storages
Class Concat
java.lang.Object
io.kestra.core.models.tasks.Task
io.kestra.core.tasks.storages.Concat
- All Implemented Interfaces:
RunnableTask<Concat.Output>
@Example(title="Concat 2 files with a custom separator",code={"files: "," - \"kestra://long/url/file1.txt\""," - \"kestra://long/url/file2.txt\"","separator: \"\\n\""}) @Example(title="Concat files generated by an each task",code={"tasks:"," - id: each"," type: io.kestra.core.tasks.flows.EachSequential"," tasks:"," - id: start_api_call"," type: io.kestra.plugin.scripts.shell.Commands"," commands:"," - echo {{ taskrun.value }} > {{ temp.generated }}"," files:"," - generated"," value: \'[\"value1\", \"value2\", \"value3\"]\'"," - id: concat"," type: io.kestra.core.tasks.storages.Concat"," files:"," - \"{{ outputs.start_api_call.value1.files.generated }}\""," - \"{{ outputs.start_api_call.value2.files.generated }}\""," - \"{{ outputs.start_api_call.value3.files.generated }}\""},full=true) @Example(title="Concat a dynamic number of files",code={"tasks:"," - id: echo"," type: io.kestra.plugin.scripts.shell.Commands"," commands:"," - echo \"Hello John\" > {{ outputDirs.output }}/1.txt"," - echo \"Hello Jane\" > {{ outputDirs.output }}/2.txt"," - echo \"Hello Doe\" > {{ outputDirs.output }}/3.txt"," outputDirs:"," - output"," - id: concat"," type: io.kestra.core.tasks.storages.Concat"," files: \"{{ outputs.echo.files | jq(\'.[]\') }}\""},full=true)
public class Concat
extends Task
implements RunnableTask<Concat.Output>
-
Nested Class Summary
Nested Classes -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionrun(RunContext runContext) Thsis method is called inside the Worker to run (execute) the task.Methods inherited from class io.kestra.core.models.tasks.Task
findById, findById, isFlowable, isSendToWorkerTask
-
Constructor Details
-
Concat
public Concat()
-
-
Method Details
-
run
Description copied from interface:RunnableTaskThsis method is called inside the Worker to run (execute) the task.- Specified by:
runin interfaceRunnableTask<Concat.Output>- Throws:
Exception
-