sdmx-twg / sdmx-im

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

Series Key Data Constraint - allow multiple values in key #31

Open agent96 opened 6 months ago

agent96 commented 6 months ago

A data constraint which contains a DataKeySet allows for the definition of constrained keys or wildcard keys, for example

Constrained Series A.UK.EMP.M
A.FR.EMP.M

Constrained Wildcard Series A..EMP.M

The problem comes when the constraint needs to constrain mulitple values in a dimension but not all values (i.e. a wildcard is too wide a scope) For example:

//constrain a set of countries for employed male

A.UK.EMP.M  
A.FR.EMP.M
A.DE.EMP.M

//constrain a set of countries for employed female

A.UK.EMP.F  
A.FR.EMP.F
A.DE.EMP.F

When mulitple dimensions are involved with multiple values in each dimension the number of series grows as a cartesian product. It is better to have a series constraint with multiple values in the key part which can collapse multiple rules into one:

A.UK+FR+DE.EMP.M+F

The SDMX Schmea defines a Key as having 1-many KeyValue, and a KeyValue is an id/value pair. If the KeyValue was modified to allow one or more values this use case would be supported.