OutputValues
OutputValues
yaml
type: "io.kestra.plugin.core.output.OutputValues"
Output one or more values.
You can use this task to return some outputs and pass them to downstream tasks.
It's helpful for parsing and returning values from a task. You can then access these outputs in your downstream tasks
using the expression {{ outputs.mytask_id.values.my_output_name }}
and you can see them in the Outputs tab.
The values can be strings, numbers, arrays, or any valid JSON object.
Examples
yaml
id: outputs_flow
namespace: company.team
tasks:
- id: output_values
type: io.kestra.plugin.core.output.OutputValues
values:
taskrun_data: "{{ task.id }} > {{ taskrun.startDate }}"
execution_data: "{{ flow.id }} > {{ execution.startDate }}"
number_value: 42
array_value: ["{{ task.id }}", "{{ flow.id }}", "static value"]
nested_object:
key1: "value1"
key2: "{{ execution.id }}"
- id: log_values
type: io.kestra.plugin.core.log.Log
message: |
Got the following outputs from the previous task:
{{ outputs.output_values.values.taskrun_data }}
{{ outputs.output_values.values.execution_data }}
Properties
values
- Type: object
- Dynamic: ❓
- Required: ❌
The templated strings to render.
These values can be strings, numbers, arrays, or objects. Templated strings (enclosed in ) will be rendered using the current context.
Outputs
values
- Type: object
- Required: ❌
The generated values.
Definitions
Was this page helpful?