You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ed2f979
Browse filesBrowse the repository at this point in the historyBrowse files
authored
feat: Postgres supported as Registry, Online store, and Offline store (#2401)
* Feast-postgres added to Feast repo
Signed-off-by: Gunnar Sv Sigurbjörnsson <[email protected]>
* Add a template for postgres to allow feast init -t postgres
Signed-off-by: Gunnar Sv Sigurbjörnsson <[email protected]>
* Split contrib repo configuration to separate file for each
Signed-off-by: Gunnar Sv Sigurbjörnsson <[email protected]>
* Moved the postgres type maps into feast.type_map
Signed-off-by: Gunnar Sv Sigurbjörnsson <[email protected]>
* Upgrade to latest feast, get postgres tests running, pip lock files
Signed-off-by: Gunnar Sv Sigurbjörnsson <[email protected]>
* Fix setup.py
Signed-off-by: Kevin Zhang <[email protected]>
* Fix the ci requirements
Signed-off-by: Kevin Zhang <[email protected]>
* Fix repo_config for rest of sources
Signed-off-by: Kevin Zhang <[email protected]>
* Make backwards compatible with python 3.8-
Signed-off-by: Kevin Zhang <[email protected]>
* Fix
Signed-off-by: Kevin Zhang <[email protected]>
* Fix
Signed-off-by: Kevin Zhang <[email protected]>
* address comments
Signed-off-by: Danny Chiao <[email protected]>
* update lock files
Signed-off-by: Danny Chiao <[email protected]>
* fix
Signed-off-by: Danny Chiao <[email protected]>
* lock files
Signed-off-by: Danny Chiao <[email protected]>
* fix
Signed-off-by: Danny Chiao <[email protected]>
* cleanup
Signed-off-by: Danny Chiao <[email protected]>
* missed refactor name
Signed-off-by: Danny Chiao <[email protected]>
* Remove snowflake references from test.py for postgres
Signed-off-by: Gunnar Sv Sigurbjörnsson <[email protected]>
* update repo to match new API
Signed-off-by: Danny Chiao <[email protected]>
* Add documentation
Signed-off-by: Danny Chiao <[email protected]>
* rename utils
Signed-off-by: Danny Chiao <[email protected]>
* update roadmap docs
Signed-off-by: Danny Chiao <[email protected]>
* update documentation
Signed-off-by: Danny Chiao <[email protected]>
Co-authored-by: Kevin Zhang <[email protected]>
Co-authored-by: Kevin Zhang <[email protected]>
Co-authored-by: Danny Chiao <[email protected]>
*[x] Kafka / Kinesis sources (via [push support into the online store](https://docs.feast.dev/reference/data-sources/push))
152
152
*[ ] HTTP source
153
153
***Offline Stores**
@@ -156,9 +156,9 @@ The list below contains the functionality that contributors are planning to deve
*[x][Custom offline store support](https://docs.feast.dev/how-to-guides/adding-a-new-offline-store)
164
164
***Online Stores**
@@ -167,7 +167,7 @@ The list below contains the functionality that contributors are planning to deve
*[x][Custom online store support](https://docs.feast.dev/how-to-guides/adding-support-for-a-new-online-store)
*[x] Kafka / Kinesis sources (via [push support into the online store](https://docs.feast.dev/reference/data-sources/push))
25
25
*[ ] HTTP source
26
26
@@ -31,9 +31,9 @@ Don't see your offline store or online store of choice here? Check out our guide
*[x][Custom offline store support](https://docs.feast.dev/how-to-guides/adding-a-new-offline-store)
39
39
@@ -44,7 +44,7 @@ Don't see your offline store or online store of choice here? Check out our guide
*[x][Custom online store support](https://docs.feast.dev/how-to-guides/adding-support-for-a-new-online-store)
**NOTE**: The Postgres plugin is a contrib plugin. This means it may not be fully stable.
6
+
7
+
8
+
The PostgreSQL data source allows for the retrieval of historical feature values from a PostgreSQL database for building training datasets as well as materializing features into an online store.
9
+
10
+
## Examples
11
+
12
+
Defining a Postgres source
13
+
14
+
```python
15
+
from feast.infra.offline_stores.contrib.postgres_offline_store.postgres_source import (
The PostgreSQL offline store is an offline store that provides support for reading [PostgreSQL](../data-sources/postgres.md) data sources.
6
+
7
+
8
+
**DISCLAIMER**: This PostgreSQL offline store still does not achieve full test coverage.
9
+
10
+
* Entity dataframes can be provided as a SQL query or can be provided as a Pandas dataframe. Pandas dataframes will be converted to a Spark dataframe and processed as a temporary view.
11
+
* A `SparkRetrievalJob` is returned when calling `get_historical_features()`.
12
+
* This allows you to call
13
+
*`to_df` to retrieve the pandas dataframe.
14
+
*`to_arrow` to retrieve the dataframe as a PyArrow table.
The PostgreSQL online store provides support for materializing feature values into a PostgreSQL database for serving online features.
6
+
7
+
* Only the latest feature values are persisted
8
+
9
+
## Example
10
+
11
+
{% code title="feature_store.yaml" %}
12
+
```yaml
13
+
project: my_feature_repo
14
+
registry: data/registry.db
15
+
provider: local
16
+
online_store:
17
+
type: postgres
18
+
host: DB_HOST
19
+
port: DB_PORT
20
+
database: DB_NAME
21
+
db_schema: DB_SCHEMA
22
+
user: DB_USERNAME
23
+
password: DB_PASSWORD
24
+
```
25
+
{% endcode %}
26
+
27
+
Configuration options are available [here](https://rtd.feast.dev/en/latest/#feast.repo_config.SqliteOnlineStoreConfig).
*[x] Kafka / Kinesis sources (via [push support into the online store](https://docs.feast.dev/reference/data-sources/push))
20
20
*[ ] HTTP source
21
21
***Offline Stores**
@@ -24,9 +24,9 @@ The list below contains the functionality that contributors are planning to deve
*[x][Custom offline store support](https://docs.feast.dev/how-to-guides/adding-a-new-offline-store)
32
32
***Online Stores**
@@ -35,7 +35,7 @@ The list below contains the functionality that contributors are planning to deve
*[x][Custom online store support](https://docs.feast.dev/how-to-guides/adding-support-for-a-new-online-store)
0 commit comments