forked from feast-dev/feast
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add duckdb offline store (feast-dev#3981)
* add ibis and duckdb offline stores Signed-off-by: tokoko <togurg14@freeuni.edu.ge> * add linter ignore rule in ibis Signed-off-by: tokoko <togurg14@freeuni.edu.ge> * add linter ignore rule in ibis Signed-off-by: tokoko <togurg14@freeuni.edu.ge> --------- Signed-off-by: tokoko <togurg14@freeuni.edu.ge> Signed-off-by: Lokesh Rangineni <lokeshforjava@gmail.com>
- Loading branch information
1 parent
8e17ae1
commit 612537b
Showing
8 changed files
with
463 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
17 changes: 17 additions & 0 deletions
17
sdk/python/feast/infra/offline_stores/contrib/duckdb_offline_store/duckdb.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import ibis | ||
from pydantic import StrictStr | ||
|
||
from feast.infra.offline_stores.contrib.ibis_offline_store.ibis import IbisOfflineStore | ||
from feast.repo_config import FeastConfigBaseModel | ||
|
||
|
||
class DuckDBOfflineStoreConfig(FeastConfigBaseModel): | ||
type: StrictStr = "duckdb" | ||
# """ Offline store type selector""" | ||
|
||
|
||
class DuckDBOfflineStore(IbisOfflineStore): | ||
@staticmethod | ||
def setup_ibis_backend(): | ||
# there's no need to call setup as duckdb is default ibis backend | ||
ibis.set_backend("duckdb") |
19 changes: 19 additions & 0 deletions
19
sdk/python/feast/infra/offline_stores/contrib/duckdb_repo_configuration.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from feast.infra.offline_stores.contrib.duckdb_offline_store.duckdb import ( | ||
DuckDBOfflineStoreConfig, | ||
) | ||
from tests.integration.feature_repos.universal.data_sources.file import ( # noqa: E402 | ||
FileDataSourceCreator, | ||
) | ||
|
||
|
||
class DuckDBDataSourceCreator(FileDataSourceCreator): | ||
def create_offline_store_config(self): | ||
self.duckdb_offline_store_config = DuckDBOfflineStoreConfig() | ||
return self.duckdb_offline_store_config | ||
|
||
|
||
AVAILABLE_OFFLINE_STORES = [ | ||
("local", DuckDBDataSourceCreator), | ||
] | ||
|
||
AVAILABLE_ONLINE_STORES = {"sqlite": ({"type": "sqlite"}, None)} |
Empty file.
Oops, something went wrong.