Unlisted Components

In SDMX a component's values can be listed (from an enumeration / codelist) or unlisted (free values, with no enumeration). sxs supports both, and handles the difference between SDMX 3.0 and SDMX 2.1 output.

Principle

  • A listed component has an enumeration: the dataset structure carries a values array, and an observation key holds the index of the value in that array.
  • An unlisted component has no enumeration: the structure carries no values array, and the observation key holds the value itself.

For example, a dataset with a listed FREQ and an unlisted GEO_ID uses a key like:

"0:2021S051247060210"

where 0 is the index of the FREQ value, and 2021S051247060210 is the raw GEO_ID value (no index, no value list).

This is the SDMX 3.0 notion of unlisted components. SDMX 2.1 does not have it.

Why use it

Not every component is coded:

  • free-text attributes (a note, a source, a description) have no codelist;
  • identifiers that are loaded as-is (a geo id, a business key) may not be published as a codelist;
  • measures are values, not codes.

Making such components unlisted avoids building a values array for what is effectively unbounded data, keeps the structure small, and lets you load and query the raw values directly.

Do not confuse unlisted components with dictionaries: a dictionary is for a component that has an enumeration but with too many codes to keep inline.

How sxs handles it

At load time, sxs flags a component as unlisted when its dataset definition has no values (no enumeration). The value is then stored directly — there is no index indirection.

The response shape depends on the requested SDMX version:

Requested versionUnlisted component in the response
SDMX 3.0 (SDMX-JSON 2.0)emitted as unlisted — no values, the key holds the value
SDMX 2.1 (SDMX-JSON 1.0)sxs builds a values array on the fly and returns indexes (JSON 1.0 has no unlisted concept)

Array and multilingual attributes may stay unlisted even in SDMX 2.1 output, since their values are carried in the observation key.

The same data therefore reads naturally in SDMX 3.0, and still produces a valid SDMX 2.1 message with a generated value list.

How to use it

  1. Define the component without an enumeration. In the DSD, give the dimension, attribute or measure a representation with no codelist.
  2. Load the raw values. In CSV or JSON, provide the value directly instead of a code.
  3. Query as usual. The same data URL is used; the shape of the answer depends on the SDMX version you request (v3 vs v2). Use attributes=all (and the relevant detail/format options) to have unlisted attributes returned.

See also

  • Dictionaries — the complementary optimization for very large enumerations.
  • Output formats — SDMX-JSON / SDMX-CSV and native formats.
  • API — query parameters and SDMX version selection.