PostgreSQL (contrib)
Description
The PostgreSQL online store provides support for materializing feature values into a PostgreSQL database for serving online features.
Only the latest feature values are persisted
sslmode, sslkey_path, sslcert_path, and sslrootcert_path are optional
Getting started
In order to use this online store, you'll need to run pip install 'feast[postgres]'
. You can get started by then running feast init -t postgres
.
Example
The full set of configuration options is available in PostgreSQLOnlineStoreConfig.
Functionality Matrix
The set of functionality supported by online stores is described in detail here. Below is a matrix indicating which functionality is supported by the Postgres online store.
To compare this set of functionality against other online stores, please see the full functionality matrix.
PGVector
The Postgres online store supports the use of PGVector for storing feature values. To enable PGVector, set pgvector_enabled: true
in the online store configuration.
The vector_len
parameter can be used to specify the length of the vector. The default value is 512.
Please make sure to follow the instructions in the repository, which, as the time of this writing, requires you to run CREATE EXTENSION vector;
in the database.
Then you can use retrieve_online_documents
to retrieve the top k closest vectors to a query vector. For the Retrieval Augmented Generation (RAG) use-case, you have to embed the query prior to passing the query vector.
Last updated