From 66da73d8e5730aa735282d503fedf8fdd64804b1 Mon Sep 17 00:00:00 2001 From: Yogesh Kumawat Date: Wed, 9 Aug 2023 12:15:45 +0530 Subject: [PATCH] code changes for the transformations as well --- .../execution_strategy/engine/spark_engine.py | 2 +- ads/feature_store/feature_group.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ads/feature_store/execution_strategy/engine/spark_engine.py b/ads/feature_store/execution_strategy/engine/spark_engine.py index f1521c6ee..77b2b3747 100644 --- a/ads/feature_store/execution_strategy/engine/spark_engine.py +++ b/ads/feature_store/execution_strategy/engine/spark_engine.py @@ -47,7 +47,7 @@ def get_time_version_data( version_number: int = None, timestamp: datetime = None, ): - split_db_name = delta_table_name.split('.') + split_db_name = delta_table_name.split(".") # Get the Delta table path delta_table_path = ( diff --git a/ads/feature_store/feature_group.py b/ads/feature_store/feature_group.py index 9dd4b8143..c8ac843cb 100644 --- a/ads/feature_store/feature_group.py +++ b/ads/feature_store/feature_group.py @@ -432,6 +432,11 @@ def with_transformation_id(self, transformation_id: str) -> "FeatureGroup": FeatureGroup The FeatureGroup instance (self) """ + + # Initialize the empty dictionary as transformation arguemnts if not specified + if not self.transformation_kwargs: + self.with_transformation_kwargs() + return self.set_spec(self.CONST_TRANSFORMATION_ID, transformation_id) def _with_lifecycle_state(self, lifecycle_state: str) -> "FeatureGroup": @@ -1050,7 +1055,7 @@ def as_of( """ self.check_resource_materialization() - #validate_delta_format_parameters(timestamp, version_number) + # validate_delta_format_parameters(timestamp, version_number) target_table = self.target_delta_table() return self.spark_engine.get_time_version_data(