Registry / workflow / apache-airflow-providers-pgvector

apache-airflow-providers-pgvector

JSON →
library1.7.1pypypiunverified

An Apache Airflow provider package that integrates pgvector, enabling vector similarity search operations in Airflow via hooks and operators. Current version is 1.7.1, released under the Airflow provider maintenance cadence.

pip install apache-airflow-providers-pgvector
INSTALL
IMPORT
SIG · APACHE-AIRFLOW-PRO
A
apache-airflow-providers-pgvector
workflowpythonv1.7.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PgvectorHook
from airflow.providers.pgvector.hooks.pgvector import PgvectorHook
from airflow.providers.pgvector.hooks.pgvector import PgvectorHook

Minimal DAG using PgvectorOperator to create a table with vector column and insert data.

from airflow import DAG from datetime import datetime from airflow.providers.pgvector.operators.pgvector import PgvectorOperator with DAG( dag_id='pgvector_demo', start_date=datetime(2024, 1, 1), schedule=None, catchup=False ) as dag: create_table = PgvectorOperator( task_id='create_hnsw_index', sql="CREATE TABLE IF NOT EXISTS items (id bigserial PRIMARY KEY, embedding vector(3))" ) insert = PgvectorOperator( task_id='insert_vector', sql="INSERT INTO items (embedding) VALUES ('[1,2,3]'::vector)" ) create_table >> insert
Debug
Known issues
breakingIn provider version 1.0.0, the import paths changed from 'airflow.providers.pgvector.hooks.pgvector_hook' to 'airflow.providers.pgvector.hooks.pgvector' and operators similarly.
fix
Update imports to use the new paths as shown in the imports section.
affects: <1.0.0
gotchaThe provider requires the pgvector extension to be installed in PostgreSQL; simply installing the Python package is insufficient.
fix
Ensure your PostgreSQL instance has the pgvector extension installed (e.g., CREATE EXTENSION vector;).
affects: all
gotchaConnection configuration: the hook expects an Airflow connection with conn_type='postgres' and extra containing pgvector-specific parameters. Using wrong conn_type or missing extras will cause connection failures.
fix
Set up a Postgres connection in Airflow (conn_type='postgres') and in extras provide e.g., {"pgvector": true}. Ensure host, schema, login, password are correct.
affects: all
Upgrade
Version history
1.7.1latest on PyPI · released Mar 28, 2026
Audit
Dependencies
apache-airflowrequiredCore Airflow dependency; provider requires Airflow 2.6+
pgvectorrequiredRequired for pgvector functionality
Agent activity
86 hits · last 30 days
node
74
Perplexity
1
OpenAI (training)
1
Resources
apache-airflow-providers-pgvector — pip install apache-airflow-providers-pgvector · libregistry