sdmx-twg / sdmx-im

SDMX Information Model - UML model and functional description, definition of classes, associations and attributes
6 stars 3 forks source link

Support for multi-valued attributes, use case of flags #5

Closed tasosc closed 4 years ago

tasosc commented 7 years ago

(on behalf of Eurostat) Initial request: Domain SDMX request - Multiple flagging.pdf

A short summary of the request: The request is about adding support somehow for data attributes to have more than one code in datasets.

So if we have a Codelist with 3 codes {r, u, e}, as an example, it should be possible to have, in a dataset , within an observation attribute (e.g. OBS_FLAG) for one specific observation one of the following values:

See example below, where OBS_FLAG attribute uses 2 codes rand u for a specific observation using space as a separator ( ):

<generic:Obs>
  <generic:ObsDimension value="2014" />
  <generic:ObsValue value="5.06944075E8" />
  <generic:Attributes>
    <generic:Value id="OBS_FLAG" value="r u" />
  </generic:Attributes>
</generic:Obs>
agent96 commented 5 years ago

Just a point to note, the VTL Functional Integrity rules state that

Each Component has a distinct name in the Data Structure of the Data Set and contains one scalar value for each Data Point

This is from the VTL user manula lines 853 and 854

It will be useful to know if/how VTL will align with SDMX if SDMX allows for multiple attribute values for a single 'Data Point'.

stratosn commented 4 years ago

This issue (renamed to "Arrays for Attribute values" to reflect better the use case) is being considered together with sdmx-twg/sdmx-im#4 , since it impacts the dataset message and needs to be combined with the multiple measures issue, for considering also attaching Attributes to Measures.

The proposed idea, at the time of this writing, is to introduce an extension to the current way SDMX Attributes are reported. This means that SDMX Attributes will be reported as now, when a single value is reported; when an array of values needs to be reported for an Attribute, e.g. many status values for Attribute OBS_STATUS, then an XML array will be included under the corresponding dataset element that the Attribute is reported, named after the Attribute. For the OBS_VALUE example, when reported under the <Obs> element:

<Obs ... >
  <OBS_STATUS>
    <value>D</value>
    <value>B</value>
    <value>Q</value>
  </OBS_STATUS>
Tzaphkiel commented 4 years ago

Rejected, see combined issue with #4 : #6