Vespa Get
Certified
Get one Vespa document by its ID
Vespa Get
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.
type: io.kestra.plugin.vespa.GetExamples
Find the closest album to a vector, then read the whole document.
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
documentId *string
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 *.
endpoint *string
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
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.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset 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.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150connectTimeout string
The time allowed to connect to Vespa
Unset uses the Kestra HTTP client's default.
errorOnMissing booleanstring
falseFail the task when the document doesn't exist
Default false: a missing document gives a null document.
readTimeout string
The longest wait for data from Vespa
Defaults to 5 minutes.
token string
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.
Outputs
document object
Document fields
The document's fields by name, tensors as Vespa renders them; null when the document doesn't exist.
id string
Vespa document ID
As Vespa returns it, also when the document doesn't exist.