Set Set

yaml
type: "io.kestra.plugin.core.kv.Set"

Create or modify a Key-Value pair.

Examples

Set the task's uri output as a value for orders_file key.

yaml
id: kv_store_set
namespace: company.team

tasks:
  - id: http_download
    type: io.kestra.plugin.core.http.Download
    uri: https://huggingface.co/datasets/kestra/datasets/raw/main/csv/orders.csv

  - id: kv_set
    type: io.kestra.plugin.core.kv.Set
    key: orders_file
    value: "{{ outputs.http_download.uri }}"
    kvType: STRING

Properties

key

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️

The key for which to set the value.

namespace

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️
  • Default: {{ flow.namespace }}

The namespace in which the KV pair will be stored. By default, Kestra will use the namespace of the flow.

overwrite

  • Type: boolean
  • Dynamic:
  • Required: ✔️
  • Default: true

Whether to overwrite or fail if a value for the given key already exists.

value

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️

The value to map to the key.

kvType

  • Type: string
  • Dynamic:
  • Required:
  • Possible Values:
    • STRING
    • NUMBER
    • BOOLEAN
    • DATETIME
    • DATE
    • DURATION
    • JSON

Enum representing the data type of the KV pair. If not set, the value will be stored as a string.

ttl

  • Type: string
  • Dynamic:
  • Required:
  • Format: duration

Optional Time-To-Live (TTL) duration for the key-value pair. If not set, the KV pair will never be deleted from internal storage.

Outputs

Definitions

Was this page helpful?