VespaIngestOperator¶
Use the VespaIngestOperator to
ingest, update, or delete documents in a Vespa instance.
Using the Operator¶
The VespaIngestOperator accepts a list of documents through the docs argument and defers the
feed operation to a trigger. Use vespa_conn_id to specify the Airflow connection to use when
resolving the target Vespa instance.
Note
Because the operator always defers execution, a running triggerer component is required.
An example using the operator in this way:
send_batches = VespaIngestOperator.partial(vespa_conn_id=vespa_conn_id, task_id="send_batch").expand(
docs=batches
)
update_doc3 = VespaIngestOperator(
vespa_conn_id=vespa_conn_id,
task_id="update_doc3",
docs=[{"id": "doc3", "fields": {"body": "third document - UPDATED"}}],
operation_type="update",
)
delete_doc4 = VespaIngestOperator(
vespa_conn_id=vespa_conn_id,
task_id="delete_doc4",
docs=[{"id": "doc4"}],
operation_type="delete",
)