Hybrid
Description
The HybridOfflineStore allows routing offline feature operations to different offline store backends based on the batch_source of the FeatureView. This enables a single Feast deployment to support multiple offline store backends, each configured independently and selected dynamically at runtime.
Getting started
To use the HybridOfflineStore, install Feast with all required offline store dependencies (e.g., BigQuery, Snowflake, etc.) for the stores you plan to use. For example:
pip install 'feast[spark,snowflake]'Example
project: my_feature_repo
registry: data/registry.db
provider: local
offline_store:
type: hybrid
offline_stores:
- type: spark
conf:
spark_master: local[*]
spark_app_name: feast_spark_app
- type: snowflake
conf:
account: my_snowflake_account
user: feast_user
password: feast_password
database: feast_database
schema: feast_schemaExample FeatureView
Then you can use materialize API to materialize the data from the specified offline store based on the batch_source of the FeatureView.
Using ConnectionRef with Hybrid Offline Store
When using the HybridOfflineStore, each data source can carry its own credentials via ConnectionRef. This is particularly useful when different feature views connect to different accounts or clusters — you no longer need to embed all credentials in feature_store.yaml.
Example: Per-DataSource Credentials
In this setup:
No sensitive credentials are stored in
feature_store.yaml.Each data source resolves its credentials independently at runtime from the referenced Kubernetes Secret.
The HybridOfflineStore routes operations to the correct backend based on the source type.
How credential resolution works
The HybridOfflineStore determines which backend to use based on the data source class (e.g.,
SnowflakeSource→ Snowflake offline store).Before connecting, the offline store checks if the data source has a
connection_ref.If present, credentials are fetched from the external provider (e.g., reading a Kubernetes Secret).
Resolved credentials override the global offline store config for that operation.
If no
connection_refis set, the globalfeature_store.yamlconfiguration is used as a fallback.
This pattern is especially valuable in multi-tenant environments where a shared Feast deployment serves multiple teams, each with isolated credentials and backend accounts.
For details on the ConnectionRef structure and supported providers, see Data Sources Overview.
Functionality Matrix
pull_latest_from_table_or_query
Yes
pull_all_from_table_or_query
Yes
offline_write_batch
Yes
validate_data_source
Yes
get_table_column_names_and_types_from_data_source
Yes
write_logged_features
No
get_historical_features
Only with same data source
Last updated
Was this helpful?