Apache Airflow Provider for Qdrant
raw JSON → 1.5.5 verified Sat May 09 auth: no python
An official Apache Airflow provider that integrates Qdrant vector database as an Airflow hook and operator. Version 1.5.5 supports Airflow >=2.10.0 and Qdrant client >=1.13.0, enabling document ingestion, vector search, and collection management in Airflow DAGs. Maintained by the Apache Airflow community, released on PyPI monthly.
pip install apache-airflow-providers-qdrant Common errors
error ModuleNotFoundError: No module named 'airflow.providers.qdrant' ↓
cause The provider package is not installed or Airflow's provider manager didn't sync it.
fix
Run 'pip install apache-airflow-providers-qdrant' and restart your Airflow webserver/scheduler.
error AttributeError: module 'airflow.providers.qdrant.hooks.qdrant' has no attribute 'QdrantHook' ↓
cause Imported the wrong symbol or the provider version is too old (<1.0.0).
fix
Upgrade to latest provider: 'pip install --upgrade apache-airflow-providers-qdrant' and verify the import path: 'from airflow.providers.qdrant.hooks.qdrant import QdrantHook'.
Warnings
breaking In version 1.4.0, the operator 'QdrantIngestOperator' was renamed from the old 'QdrantHookOperator' (deprecated). Use the new name to avoid import errors. ↓
fix Replace 'QdrantHookOperator' with 'QdrantIngestOperator' in imports and code.
gotcha The QdrantClient integrated via the hook defaults to 'localhost:6333' if no connection ID is provided. This can lead to accidental production writes if environment variables are missing. ↓
fix Always set a connection ID (e.g., 'qdrant_default') in your Airflow connections, and avoid relying on default values outside of testing.
deprecated The 'qdrant_host', 'qdrant_port', and 'qdrant_api_key' parameters on QdrantHook are deprecated since v1.3.0. Use a Qdrant connection ID instead. ↓
fix Create an Airflow connection of type 'qdrant' with host, port, and API key, then pass the conn_id to the hook.
Imports
- QdrantHook wrong
from airflow_providers_qdrant.hooks.qdrant import QdrantHookcorrectfrom airflow.providers.qdrant.hooks.qdrant import QdrantHook - QdrantIngestOperator wrong
from airflow.providers.qdrant.operators import QdrantIngestOperatorcorrectfrom airflow.providers.qdrant.operators.qdrant import QdrantIngestOperator
Quickstart
from datetime import datetime
from airflow import DAG
from airflow.providers.qdrant.hooks.qdrant import QdrantHook
from airflow.providers.qdrant.operators.qdrant import QdrantIngestOperator
import os
with DAG(
dag_id='qdrant_ingest_example',
start_date=datetime(2025, 1, 1),
schedule=None,
catchup=False,
) as dag:
hook = QdrantHook(
qdrant_host=os.environ.get('QDRANT_HOST', 'localhost'),
qdrant_port=os.environ.get('QDRANT_PORT', '6333'),
qdrant_api_key=os.environ.get('QDRANT_API_KEY', ''),
)
ingest = QdrantIngestOperator(
task_id='ingest_docs',
collection_name='my_collection',
documents=[{'id': 1, 'text': 'Hello world'}],
qdrant_conn_id='qdrant_default',
)