Summary
The expression_to_expression_mappings field is defined in the linkml-map schema (SlotDerivation class) but is not implemented in the transformer runtime. Files that use this field pass schema validation but the mappings are silently ignored during transformation.
Current behavior
When a SlotDerivation includes expression_to_expression_mappings, the transformer does not process them — the mappings have no effect on the output.
Expected behavior
The transformer should evaluate expression_to_expression_mappings entries, applying the source-to-target expression mapping during transformation.
Use case
We're writing transformation specs for the BioData Catalyst harmonized variables project where visit identifiers need to be mapped through expressions. Currently we use case() expressions as a workaround:
associated_visit:
expr: 'uuid5("https://w3id.org/bdchm/Visit", str({phv00177237}) + ":" + case(({phv00177238} == ''2'', ''FHS NEW OFFSPRING SPOUSE EXAM 2''), ({phv00177238} == ''3'', ''FHS GENERATION 3 EXAM 2'')))'
With expression_to_expression_mappings support, this could be expressed more cleanly:
associated_visit:
populated_from: phv00177238
expression_to_expression_mappings:
'{phv00177238} == 2': 'uuid5("https://w3id.org/bdchm/Visit", str({phv00177237}) + ":FHS NEW OFFSPRING SPOUSE EXAM 2")'
'{phv00177238} == 3': 'uuid5("https://w3id.org/bdchm/Visit", str({phv00177237}) + ":FHS GENERATION 3 EXAM 2")'
Environment
- linkml-map version: 0.3.9
- The schema field exists in
transformer_model.py as part of SlotDerivation
Summary
The
expression_to_expression_mappingsfield is defined in the linkml-map schema (SlotDerivationclass) but is not implemented in the transformer runtime. Files that use this field pass schema validation but the mappings are silently ignored during transformation.Current behavior
When a
SlotDerivationincludesexpression_to_expression_mappings, the transformer does not process them — the mappings have no effect on the output.Expected behavior
The transformer should evaluate
expression_to_expression_mappingsentries, applying the source-to-target expression mapping during transformation.Use case
We're writing transformation specs for the BioData Catalyst harmonized variables project where visit identifiers need to be mapped through expressions. Currently we use
case()expressions as a workaround:With
expression_to_expression_mappingssupport, this could be expressed more cleanly:Environment
transformer_model.pyas part ofSlotDerivation