QdrantIngestOperator¶
Use the QdrantIngestOperator
to
ingest data into a Qdrant instance.
Using the Operator¶
The QdrantIngestOperator requires the vectors
as an input ingest into Qdrant. Use the conn_id
parameter to
specify the Qdrant connection to connect to Qdrant instance. The vectors could also contain metadata referencing
the original text corresponding to the vectors that could be ingested into the database.
An example using the operator in this way:
vectors = [[0.732, 0.611, 0.289, 0.421], [0.217, 0.526, 0.416, 0.981], [0.326, 0.483, 0.376, 0.136]]
ids: list[str | int] = [32, 21, "b626f6a9-b14d-4af9-b7c3-43d8deb719a6"]
payload = [{"meta": "data"}, {"meta": "data_2"}, {"meta": "data_3", "extra": "data"}]
QdrantIngestOperator(
task_id="qdrant_ingest",
collection_name="test_collection",
vectors=vectors,
ids=ids,
payload=payload,
batch_size=1,
)