Vespa Get

Vespa Get

Certified

Get one Vespa document by its ID

Reads one document from the Vespa document API (/document/v1) and returns its fields as document. A document that doesn't exist gives a null document, or fails the task with errorOnMissing: true.

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

Find the closest album to a vector, then read the whole document.

yaml
id: vespa_get
namespace: company.team

tasks:
  - id: nearest
    type: io.kestra.plugin.vespa.Query
    endpoint: "{{ secret('VESPA_ENDPOINT') }}"
    token: "{{ secret('VESPA_TOKEN') }}"
    yql: "select * from music where {targetHits:1}nearestNeighbor(embedding, q)"
    ranking: closeness
    parameters:
      input.query(q): [0, 0, 1, 0]
    fetchType: FETCH_ONE

  - id: get
    type: io.kestra.plugin.vespa.Get
    endpoint: "{{ secret('VESPA_ENDPOINT') }}"
    token: "{{ secret('VESPA_TOKEN') }}"
    documentId: "{{ outputs.nearest.row.id }}"
    errorOnMissing: true

  - id: log_document
    type: io.kestra.plugin.core.log.Log
    message: "{{ outputs.get.document.artist }}: {{ outputs.get.document.album }}"
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 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. A Query hit's id is one when the document's summary carries it, as with select *.

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.

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 time allowed to connect to Vespa

Unset uses the Kestra HTTP client's default.

Defaultfalse

Fail the task when the document doesn't exist

Default false: a missing document gives a null document.

The longest wait for data from Vespa

Defaults to 5 minutes.

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.

Document fields

The document's fields by name, tensors as Vespa renders them; null when the document doesn't exist.

Vespa document ID

As Vespa returns it, also when the document doesn't exist.