Skip to content

Commit 6dc1368

Browse files
fix: Fix bug with no SqlRegistryConfig class (feast-dev#3586)
* adding SqlRegistryConfig class Signed-off-by: davidschuler-8451 <david.schuler@8451.com> * refactor: move SqlRegistryConfig class to sql.py Signed-off-by: davidschuler-8451 <david.schuler@8451.com> * enabling SqlRegistry to accept RegistryConfig or SqlRegistryConfig Signed-off-by: davidschuler-8451 <david.schuler@8451.com> --------- Signed-off-by: davidschuler-8451 <david.schuler@8451.com>
1 parent 6c09c39 commit 6dc1368

File tree

1 file changed

+11
-1
lines changed
  • sdk/python/feast/infra/registry

1 file changed

+11
-1
lines changed

sdk/python/feast/infra/registry/sql.py

+11-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from threading import Lock
66
from typing import Any, Callable, List, Optional, Set, Union
77

8+
from pydantic import StrictStr
89
from sqlalchemy import ( # type: ignore
910
BigInteger,
1011
Column,
@@ -178,10 +179,19 @@ class FeastMetadataKeys(Enum):
178179
)
179180

180181

182+
class SqlRegistryConfig(RegistryConfig):
183+
registry_type: StrictStr = "sql"
184+
""" str: Provider name or a class name that implements Registry."""
185+
186+
path: StrictStr = ""
187+
""" str: Path to metadata store.
188+
If registry_type is 'sql', then this is a database URL as expected by SQLAlchemy """
189+
190+
181191
class SqlRegistry(BaseRegistry):
182192
def __init__(
183193
self,
184-
registry_config: Optional[RegistryConfig],
194+
registry_config: Optional[Union[RegistryConfig, SqlRegistryConfig]],
185195
project: str,
186196
repo_path: Optional[Path],
187197
):

0 commit comments

Comments
 (0)