docs/integrations/destinations/pgvector.md
This page guides you through the process of setting up the PGVector destination connector.
There are three parts to this:
text-embedding-ada-002embed-english-light-v2.0random vectors with 1536 embedding dimensionse5-base-v2.VECTOR data type which is achieved installing pgvector.To use the PGVector destination, you'll need:
You'll need the following information to configure the destination:
Make sure your Postgres database can be accessed by Airbyte. If your database is within a VPC, you may need to allow access from the IP you're using to expose Airbyte.
You need a Postgres user with the following permissions:
You can create such a user by running:
CREATE USER airbyte_user WITH PASSWORD '<password>';
GRANT CREATE, TEMPORARY ON DATABASE <database> TO airbyte_user;
You can also use a pre-existing user but we highly recommend creating a dedicated user for Airbyte.
Enable the extension. Here you can find the official documentation.
CREATE EXTENSION vector;
You will need to choose an existing database or create a new database that will be used to store synced data from Airbyte.
From Postgres SQL Identifiers syntax:
SQL identifiers and key words must begin with a letter (a-z, but also letters with diacritical marks and non-Latin letters) or an underscore (_).
Subsequent characters in an identifier or key word can be letters, underscores, digits (0-9), or dollar signs ($).
Note that dollar signs are not allowed in identifiers according to the SQL standard, so their use might render applications less portable. The SQL standard will not define a key word that contains digits or starts or ends with an underscore, so identifiers of this form are safe against possible conflict with future extensions of the standard.
The system uses no more than NAMEDATALEN-1 bytes of an identifier; longer names can be written in commands, but they will be truncated. By default, NAMEDATALEN is 64 so the maximum identifier length is 63 bytes
Quoted identifiers can contain any character, except the character with code zero. (To include a double quote, write two double quotes.) This allows constructing table or column names that would otherwise not be possible, such as ones containing spaces or ampersands. The length limitation still applies.
Quoting an identifier also makes it case-sensitive, whereas unquoted names are always folded to lower case.
In order to make your applications portable and less error-prone, use consistent quoting with each name (either always quote it or never quote it).
:::info
Airbyte Postgres destination will create raw tables and schemas using the Unquoted identifiers by replacing any special characters with an underscore. All final tables and their corresponding columns are created using Quoted identifiers preserving the case sensitivity. Special characters in final tables are replaced with underscores.
:::
:::note
The schema names are case sensitive. The 'public' schema is set by default.
:::
| Sync mode | Supported? |
|---|---|
| Full Refresh - Overwrite | Yes |
| Full Refresh - Append | Yes |
| Full Refresh - Overwrite + Deduped | No |
| Incremental Sync - Append | Yes |
| Incremental Sync - Append + Deduped | Yes |
All fields specified as metadata fields will be stored in the metadata object of the document and can be used for filtering. The following data types are allowed for metadata fields:
All other fields are ignored.
Each record will be split into text fields and meta fields as configured in the "Processing" section. All text fields are concatenated into a single string and then split into chunks of configured length. If specified, the metadata fields are stored as-is along with the embedded text chunks. Please note that meta data fields can only be used for filtering and not for retrieval and have to be of type string, number, boolean (all other values are ignored). Please note that there's a 40kb limit on the total size of the metadata saved for each entry. Options around configuring the chunking process use the Langchain Python library.
When specifying text fields, you can access nested fields in the record by using dot notation, e.g. user.name will access the name field in the user object. It's also possible to use wildcards to access all fields in an object, e.g. users.*.name will access all names fields in all entries of the users array.
The chunk length is measured in tokens produced by the tiktoken library. The maximum is 8191 tokens, which is the maximum length supported by the text-embedding-ada-002 model.
The stream name gets added as a metadata field _ab_stream to each document. If available, the primary key of the record is used to identify the document to avoid duplications when updated versions of records are indexed. It is added as the _ab_record_id metadata field.
The connector can use one of the following embedding methods:
OpenAI - using OpenAI API , the connector will produce embeddings using the text-embedding-ada-002 model with 1536 dimensions. This integration will be constrained by the speed of the OpenAI embedding API.
Cohere - using the Cohere API, the connector will produce embeddings using the embed-english-light-v2.0 model with 1024 dimensions.
For testing purposes, it's also possible to use the Fake embeddings integration. It will generate random embeddings and is suitable to test a data pipeline without incurring embedding costs.
All streams will be indexed/stored into a table with the same name. The table will be created if it doesn't exist. The table will have the following columns:
Given your password contains the character @, it is likely that the connection string will not be created properly given it is a reserved character. If it is the case, we suggest replacing @ to %40 (the equivalent UTF-8 character) in order for the authentication to properly work.
This destination does not support namespaces.
| Version | Date | Pull Request | Subject |
|---|---|---|---|
| 0.1.8 | 2025-10-21 | 68347 | Update dependencies |
| 0.1.7 | 2025-10-14 | 67996 | Update dependencies |
| 0.1.6 | 2025-10-07 | 67175 | Update dependencies |
| 0.1.5 | 2025-09-30 | 65045 | Update dependencies |
| 0.1.4 | 2025-07-05 | 61623 | Update dependencies |
| 0.1.3 | 2025-05-17 | 51728 | Update dependencies |
| 0.1.2 | 2025-01-11 | 45767 | Starting with this version, the Docker image is now rootless. Please note that this and future versions will not be compatible with Airbyte versions earlier than 0.64 |
| 0.1.1 | 2024-09-23 | #45636 | Add default values for default_schema and port. |
| 0.1.0 | 2024-09-16 | #45428 | Add support for PGVector as a Vector destination. |