Search…
PostgreSQL (contrib)

Description

The PostgreSQL offline store is an offline store that provides support for reading PostgreSQL data sources.
DISCLAIMER: This PostgreSQL offline store still does not achieve full test coverage.
  • 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.
  • A PostgreSQLRetrievalJob is returned when calling get_historical_features().
    • This allows you to call
      • to_df to retrieve the pandas dataframe.
      • to_arrow to retrieve the dataframe as a PyArrow table.
      • to_sql to get the SQL query used to pull the features.
  • sslmode, sslkey_path, sslcert_path, and sslrootcert_path are optional

Example

feature_store.yaml
1
project: my_project
2
registry: data/registry.db
3
provider: local
4
offline_store:
5
type: postgres
6
host: DB_HOST
7
port: DB_PORT
8
database: DB_NAME
9
db_schema: DB_SCHEMA
10
user: DB_USERNAME
11
password: DB_PASSWORD
12
sslmode: verify-ca
13
sslkey_path: /path/to/client-key.pem
14
sslcert_path: /path/to/client-cert.pem
15
sslrootcert_path: /path/to/server-ca.pem
16
online_store:
17
path: data/online_store.db
Copied!
Export as PDF
Copy link
Edit on GitHub