Skip to content

Commit 67316d9

Browse files
committed
created utils for efs
1 parent 812004d commit 67316d9

File tree

3 files changed

+50
-47
lines changed

3 files changed

+50
-47
lines changed

src/teradata_mcp_server/server.py

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -460,52 +460,7 @@ def get_glossary_term(term_name: str) -> dict:
460460
# Feature tools leveraging the tdfs4ds package.
461461
# Run only if the EFS tools are defined in the config
462462
if any(re.match(pattern, 'fs_*') for pattern in config.get('tool',[])):
463-
class FeatureStoreConfig(BaseModel):
464-
"""
465-
Configuration class for the feature store. This model defines the metadata and catalog sources
466-
used to organize and access features, processes, and datasets across data domains.
467-
"""
468-
469-
data_domain: Optional[str] = Field(
470-
default=None,
471-
description="The data domain associated with the feature store, grouping features within the same namespace."
472-
)
473-
474-
entity: Optional[str] = Field(
475-
default=None,
476-
description="The list of entities, comma separated and in alphabetical order, upper case."
477-
)
478-
479-
db_name: Optional[str] = Field(
480-
default=None,
481-
description="Name of the database where the feature store is hosted."
482-
)
483-
484-
feature_catalog: Optional[str] = Field(
485-
default=None,
486-
description=(
487-
"Name of the feature catalog table. "
488-
"This table contains detailed metadata about features and entities."
489-
)
490-
)
491-
492-
process_catalog: Optional[str] = Field(
493-
default=None,
494-
description=(
495-
"Name of the process catalog table. "
496-
"Used to retrieve information about feature generation processes, features, and associated entities."
497-
)
498-
)
499-
500-
dataset_catalog: Optional[str] = Field(
501-
default=None,
502-
description=(
503-
"Name of the dataset catalog table. "
504-
"Used to list and manage available datasets within the feature store."
505-
)
506-
)
507-
508-
fs_config = FeatureStoreConfig()
463+
fs_config = td.FeatureStoreConfig()
509464

510465
@mcp.tool(description="Reconnect to the Teradata database if the connection is lost.")
511466
async def reconnect_to_database() -> ResponseType:
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
from .fs_resources import *
2-
from .fs_tools import *
2+
from .fs_tools import *
3+
from .fs_utils import *
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
from typing import Any, List, Optional
2+
from pydantic import Field, BaseModel
3+
4+
class FeatureStoreConfig(BaseModel):
5+
"""
6+
Configuration class for the feature store. This model defines the metadata and catalog sources
7+
used to organize and access features, processes, and datasets across data domains.
8+
"""
9+
10+
data_domain: Optional[str] = Field(
11+
default=None,
12+
description="The data domain associated with the feature store, grouping features within the same namespace."
13+
)
14+
15+
entity: Optional[str] = Field(
16+
default=None,
17+
description="The list of entities, comma separated and in alphabetical order, upper case."
18+
)
19+
20+
db_name: Optional[str] = Field(
21+
default=None,
22+
description="Name of the database where the feature store is hosted."
23+
)
24+
25+
feature_catalog: Optional[str] = Field(
26+
default=None,
27+
description=(
28+
"Name of the feature catalog table. "
29+
"This table contains detailed metadata about features and entities."
30+
)
31+
)
32+
33+
process_catalog: Optional[str] = Field(
34+
default=None,
35+
description=(
36+
"Name of the process catalog table. "
37+
"Used to retrieve information about feature generation processes, features, and associated entities."
38+
)
39+
)
40+
41+
dataset_catalog: Optional[str] = Field(
42+
default=None,
43+
description=(
44+
"Name of the dataset catalog table. "
45+
"Used to list and manage available datasets within the feature store."
46+
)
47+
)

0 commit comments

Comments
 (0)