spinedb_api.filters.value_transformer
Provides a database query manipulator that applies mathematical transformations to parameter values.
Module Contents
Functions
|
Applies renaming to parameter definition subquery. |
|
Creates a config dict for transformer. |
|
Applies value transformer manipulator to given database map. |
Makes a shorthand string from transformer configuration. |
|
|
Makes configuration dictionary out of a shorthand string. |
- spinedb_api.filters.value_transformer.apply_value_transform_to_parameter_value_sq(db_map, instructions)[source]
Applies renaming to parameter definition subquery.
- Parameters:
db_map (DatabaseMapping) – a database map
instructions (dict) – mapping from entity class name to mapping from parameter name to list of instructions
- spinedb_api.filters.value_transformer.value_transformer_config(instructions)[source]
Creates a config dict for transformer.
- spinedb_api.filters.value_transformer.value_transformer_from_dict(db_map, config)[source]
Applies value transformer manipulator to given database map.
- Parameters:
db_map (DatabaseMapping) – target database map
config (dict) – transformer configuration