KV Set

KV Set

Certified

Create or update a key-value entry.

Renders key, value, and namespace (defaults to flow namespace) and writes to the KV store. Supports TTL, description, type coercion (kvType), and overwrite control.

If kvType is set, the string value is parsed/validated accordingly (number, boolean, datetime, duration, JSON, etc.).

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

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

The key to set the value for

The value to map to the key

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.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset 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.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150

The description of the KV pair

Possible Values
STRINGNUMBERBOOLEANDATETIMEDATEDURATIONJSON

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

Default{{ flow.namespace }}

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

Defaulttrue

Flag specifying whether to overwrite or fail if a value for the given key already exists.

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