diff --git a/sdk/python/feast/infra/registry/sql.py b/sdk/python/feast/infra/registry/sql.py index 628b6d1e65..14a85e9ad9 100644 --- a/sdk/python/feast/infra/registry/sql.py +++ b/sdk/python/feast/infra/registry/sql.py @@ -5,6 +5,7 @@ from threading import Lock from typing import Any, Callable, List, Optional, Set, Union +from pydantic import StrictStr from sqlalchemy import ( # type: ignore BigInteger, Column, @@ -178,10 +179,19 @@ class FeastMetadataKeys(Enum): ) +class SqlRegistryConfig(RegistryConfig): + registry_type: StrictStr = "sql" + """ str: Provider name or a class name that implements Registry.""" + + path: StrictStr = "" + """ str: Path to metadata store. + If registry_type is 'sql', then this is a database URL as expected by SQLAlchemy """ + + class SqlRegistry(BaseRegistry): def __init__( self, - registry_config: Optional[RegistryConfig], + registry_config: Optional[Union[RegistryConfig, SqlRegistryConfig]], project: str, repo_path: Optional[Path], ):