build_fixed_map()

Build a pysdmx FixedValueMap for setting a component to a fixed value.

Usage

Source

build_fixed_map(
    target,
    value,
    located_in="target",
)

Parameters

target: str

The ID of the target component in the structure map.

value: str

The fixed value to assign to the target component.

located_in: str | None = "target"
Indicates whether the mapping is located in ‘source’ or ‘target’. Defaults to ‘target’.

Returns

FixedValueMap
A pysdmx FixedValueMap object representing the fixed mapping.

Raises

ValueError

If target or value is empty.

ValueError
If located_in is not ‘source’ or ‘target’.

Examples

>>> mapping = build_fixed_map("CONF_STATUS", "F")
>>> isinstance(mapping, FixedValueMap)
True