@@ -84,6 +84,7 @@ def test_get_input_schema_columns(self):
8484 """Test getting input schema columns from FeatureView."""
8585 input_columns = get_input_schema_columns (self .feature_view )
8686 # Note: FileSource without explicit schema falls back to entity names + timestamp
87+ # Since entities are stored as strings, we use entity name rather than join keys
8788 expected_columns = {"driver" , "event_timestamp" }
8889 self .assertEqual (input_columns , expected_columns )
8990
@@ -151,7 +152,7 @@ def test_should_apply_transformation_dataframe_input(self):
151152 # DataFrame with input schema
152153 input_df = pd .DataFrame (
153154 {
154- "driver_id " : [1 , 2 ],
155+ "driver " : [1 , 2 ],
155156 "value" : [5 , 10 ],
156157 "event_timestamp" : ["2023-01-01" , "2023-01-02" ],
157158 }
@@ -163,7 +164,7 @@ def test_should_apply_transformation_dataframe_input(self):
163164 )
164165
165166 # DataFrame with output schema
166- output_df = pd .DataFrame ({"driver_id " : [1 , 2 ], "doubled_value" : [10 , 20 ]})
167+ output_df = pd .DataFrame ({"driver " : [1 , 2 ], "doubled_value" : [10 , 20 ]})
167168
168169 result = should_apply_transformation (self .feature_view , output_df )
169170 self .assertFalse (
@@ -175,7 +176,7 @@ def test_should_apply_transformation_subset_matching(self):
175176 """Test detection with subset schema matching (superset data)."""
176177 # Data is superset of input schema (extra columns are ok)
177178 superset_input_data = {
178- "driver_id " : 1 ,
179+ "driver " : 1 ,
179180 "value" : 5 ,
180181 "event_timestamp" : "2023-01-01" ,
181182 "extra_field" : "extra_value" ,
@@ -189,28 +190,29 @@ def test_should_apply_transformation_subset_matching(self):
189190 def test_validate_transformation_compatibility (self ):
190191 """Test transformation compatibility validation."""
191192 # Valid input data
192- input_data = {"driver_id " : 1 , "value" : 5 , "event_timestamp" : "2023-01-01" }
193- transformed_data = {"driver_id " : 1 , "doubled_value" : 10 }
193+ input_data = {"driver " : 1 , "value" : 5 , "event_timestamp" : "2023-01-01" }
194+ transformed_data = {"driver " : 1 , "doubled_value" : 10 }
194195
195196 errors = validate_transformation_compatibility (
196197 self .feature_view , input_data , transformed_data
197198 )
198199 self .assertEqual (len (errors ), 0 , "Should have no errors for valid data" )
199200
200201 # Invalid input data (missing required column)
201- invalid_input_data = {"driver_id " : 1 } # Missing value and timestamp
202+ invalid_input_data = {"driver " : 1 } # Missing value and timestamp
202203
203204 errors = validate_transformation_compatibility (
204205 self .feature_view , invalid_input_data
205206 )
206207 self .assertGreater (
207208 len (errors ), 0 , "Should have errors for missing input columns"
208209 )
209- self .assertIn ("value" , str (errors ))
210+ # Only event_timestamp is required from the input schema (entity + timestamp)
211+ # 'value' is not part of the detected input schema for sources without explicit schema
210212 self .assertIn ("event_timestamp" , str (errors ))
211213
212214 # Invalid transformed data (missing required output column)
213- invalid_transformed_data = {"driver_id " : 1 } # Missing doubled_value
215+ invalid_transformed_data = {"driver " : 1 } # Missing doubled_value
214216
215217 errors = validate_transformation_compatibility (
216218 self .feature_view , input_data , invalid_transformed_data
0 commit comments