Vespa Delete

Vespa Delete

Certified

Delete Vespa documents by ID or by selection

Removes one document by its ID, or every document a selection expression matches in a content cluster, through the Vespa document API (/document/v1). A delete by selection needs allowSelection: true.

yaml
type: io.kestra.plugin.vespa.Delete

Delete one document by its ID.

yaml
id: vespa_delete
namespace: company.team

tasks:
  - id: delete
    type: io.kestra.plugin.vespa.Delete
    endpoint: "{{ secret('VESPA_ENDPOINT') }}"
    token: "{{ secret('VESPA_TOKEN') }}"
    documentId: "id:mynamespace:music::kind-of-blue"

Delete every album of one artist and log how many were removed.

yaml
id: vespa_delete_selection
namespace: company.team

tasks:
  - id: delete
    type: io.kestra.plugin.vespa.Delete
    endpoint: "{{ secret('VESPA_ENDPOINT') }}"
    token: "{{ secret('VESPA_TOKEN') }}"
    selection: 'music.artist == "Miles Davis"'
    cluster: music
    allowSelection: true

  - id: log_deleted
    type: io.kestra.plugin.core.log.Log
    message: "Deleted {{ outputs.delete.deleted }} documents"
Installation

Our standard Docker images already include this plugin. If you use a -slim image or another setup, install it with the following command:

kestractl plugins get io.kestra.plugin:plugin-vespa --compatible-for $KESTRA_VERSION

For kestractl, use your Kestra version with --compatible-for, or specify an exact plugin version.

Properties

Vespa endpoint

Base URL of the Vespa container cluster serving the query and document APIs, like http://localhost: 8080 or a Vespa Cloud endpoint. A trailing / is ignored.

Defaultfalse

Allow a delete by selection

Default false: a task with selection fails before sending anything, so a flow never removes many documents by accident.

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

Vespa content cluster

The name of the content cluster to delete from, required with selection.

The time allowed to connect to Vespa

Unset uses the Kestra HTTP client's default.

Vespa document ID

The full ID, like id: mynamespace: music::kind-of-blue, or with a number or group part like id: mynamespace: music: g=mygroup: kind-of-blue. Set this or selection. Vespa answers the same whether the document existed or not, so a mistyped ID succeeds and removes nothing.

The longest wait for data from Vespa

Defaults to 5 minutes.

Vespa document selection

Every document it matches is removed, like music.artist == "Miles Davis"; true matches every document of the cluster except those of a global document type (global="true"), which a selection doesn't reach. Set this or documentId; it needs cluster and allowSelection: true. Vespa deletes in chunks of up to 60 seconds each; with readTimeout set, each chunk is kept to half of it.

Data-plane token

Vespa Cloud data-plane token, sent as a bearer token. Unset or empty sends no token, for a self-hosted Vespa without authentication.

Number of documents deleted

For a delete by selection, the sum Vespa reports over all chunks; null for a delete by ID, since Vespa answers the same whether the document existed.