@@ -616,10 +616,14 @@ def on_recording_interface(name, recording_interface):
616616 existing_col_names = {col ["name" ] for col in existing_electrode_columns }
617617 for prop_name , prop_info in new_electrodes_properties .items ():
618618 if prop_name not in existing_col_names :
619+ # Infer data_type from schema type (required by update_recording_properties_from_table_as_json)
620+ schema_type = prop_info .get ("type" , "str" )
621+ data_type = {"number" : "float64" , "integer" : "int64" , "boolean" : "bool" , "array" : "object" }.get (schema_type , "str" )
619622 existing_electrode_columns .append (
620623 {
621624 "name" : prop_name ,
622625 "description" : prop_info .get ("description" , "No description." ),
626+ "data_type" : data_type ,
623627 }
624628 )
625629
@@ -651,10 +655,13 @@ def on_recording_interface(name, recording_interface):
651655 existing_col_names = {col ["name" ] for col in existing_unit_columns }
652656 for prop_name , prop_info in new_units_properties .items ():
653657 if prop_name not in existing_col_names :
658+ schema_type = prop_info .get ("type" , "str" )
659+ data_type = {"number" : "float64" , "integer" : "int64" , "boolean" : "bool" , "array" : "object" }.get (schema_type , "str" )
654660 existing_unit_columns .append (
655661 {
656662 "name" : prop_name ,
657663 "description" : prop_info .get ("description" , "No description." ),
664+ "data_type" : data_type ,
658665 }
659666 )
660667
0 commit comments