You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sql_query_=f"SEL count(*) AS N FROM {fs_config.feature_catalog} WHERE UPPER(data_domain) = '{data_domain.upper()}' AND ENTITY_NAME = '{entity.upper()}'"
580
-
logger.info(f"{sql_query_}")
581
-
result=tdml.execute_sql(sql_query_)
582
-
logger.info(f"{result}")
583
-
ifresult.fetchall()[0][0] >0:
584
-
fs_config.entity=entity
585
-
returnformat_text_response(f"Feature store config updated: {fs_config.model_dump(exclude_none=True)}")
520
+
data_domain: Optional[str] =None,
521
+
db_name: Optional[str] =None,
522
+
entity: Optional[str] =None,
523
+
) ->td.FeatureStoreConfig:
524
+
global_tdconn
525
+
with_tdconn.engine.connect() asconn:
526
+
returnfs_config.fs_setFeatureStoreConfig(
527
+
conn=conn,
528
+
db_name=db_name,
529
+
data_domain=data_domain,
530
+
entity=entity,
531
+
)
586
532
587
533
@mcp.tool(description="Display the current feature store configuration (database and data domain).")
@mcp.tool(description=( "List the available data domains. Requires a configured `db_name` in the feature store config. Use this to explore which entities can be used when building a dataset."))
@mcp.tool(description=("List the list of features. Requires a configured `db_name` and `data_domain` in the feature store config. Use this to explore the features available ."))
@mcp.tool(description=("List the list of available datasets.Requires a configured `db_name` in the feature store config.Use this to explore the datasets that are available ."))
@mcp.tool(description=("List the available entities for a given data domain. Requires a configured `db_name` and `data_domain` and `entity` in the feature store config. Use this to explore which entities can be used when building a dataset."))
@mcp.tool( description=("Create a dataset using selected features and an entity from the feature store. The dataset is created in the specified target database under the given name. Requires a configured feature store and data domain. Registers the dataset in the catalog automatically. Use this when you want to build and register a new dataset for analysis or modeling." ) )
629
-
asyncdeffs_createDataset(
630
-
entity_name: str=Field(..., description="Entity for which the dataset will be created. Available entities are reported in the feature catalog."),
631
-
feature_selection: list[str] =Field(..., description="List of features to include in the dataset. Available features are reported in the feature catalog."),
632
-
dataset_name: str=Field(..., description="Name of the dataset to create."),
633
-
target_database: str=Field(..., description="Target database where the dataset will be created.")
List the available data domains. Requires a configured `db_name` in the feature store config. Use this to explore which entities can be used when building a dataset.
List the available entities for a given data domain. Requires a configured `db_name` and `data_domain` and `entity` in the feature store config. Use this to explore which entities can be used when building a dataset.
Create a dataset using selected features and an entity from the feature store. The dataset is created in the specified target database under the given name. Requires a configured feature store and data domain. Registers the dataset in the catalog automatically. Use this when you want to build and register a new dataset for analysis or modeling.
336
+
Args:
337
+
entity_name (str): Entity for which the dataset will be created. Available entities are reported in the feature catalog.
338
+
feature_selection (list[str]): List of features to include in the dataset. Available features are reported in the feature catalog.
339
+
dataset_name (str): The name of the dataset to create.
340
+
target_database (str): The database where the dataset will be created.
0 commit comments