Skip to content

Commit 37a8624

Browse files
committed
Add assertions for supported sources for known online stores
Signed-off-by: Achal Shah <achals@gmail.com>
1 parent c63b037 commit 37a8624

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

‎sdk/python/feast/infra/online_stores/helpers.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def get_online_store_from_config(
3737

3838

3939
SUPPORTED_SOURCES: Dict[Any, Set[Any]] = {
40-
SqliteOnlineStoreConfig: {FileSource},
40+
SqliteOnlineStoreConfig: {FileSource, BigQuerySource},
4141
DatastoreOnlineStoreConfig: {BigQuerySource},
4242
RedisOnlineStoreConfig: {FileSource, BigQuerySource},
4343
}

‎sdk/python/feast/repo_config.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def _validate_offline_store_config(cls, values):
203203

204204
# Set the default type
205205
if "type" not in values["offline_store"]:
206-
if values["provider"] == "local" or values["provider"] == "redis":
206+
if values["provider"] == "local":
207207
values["offline_store"]["type"] = "file"
208208
elif values["provider"] == "gcp":
209209
values["offline_store"]["type"] = "bigquery"

‎sdk/python/feast/repo_operations.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from feast.feature_view import FeatureView
1616
from feast.inference import infer_entity_value_type_from_feature_views
1717
from feast.infra.offline_stores.helpers import assert_offline_store_supports_data_source
18+
from feast.infra.online_stores.helpers import assert_online_store_supports_data_source
1819
from feast.infra.provider import get_provider
1920
from feast.names import adjectives, animals
2021
from feast.registry import Registry
@@ -155,6 +156,9 @@ def apply_total(repo_config: RepoConfig, repo_path: Path):
155156
assert_offline_store_supports_data_source(
156157
repo_config.offline_store, data_source
157158
)
159+
assert_online_store_supports_data_source(
160+
repo_config.online_store, data_source
161+
)
158162

159163
tables_to_delete = []
160164
for registry_table in registry.list_feature_tables(project=project):
@@ -177,7 +181,7 @@ def apply_total(repo_config: RepoConfig, repo_path: Path):
177181
for table in repo.feature_tables:
178182
registry.apply_feature_table(table, project)
179183
click.echo(
180-
f"Registered feature table {Style.BRIGHT + Fore.GREEN}{registry_table.name}{Style.RESET_ALL}"
184+
f"Registered feature table {Style.BRIGHT + Fore.GREEN}{table.name}{Style.RESET_ALL}"
181185
)
182186

183187
# Delete views that should not exist

0 commit comments

Comments
 (0)