Wiki source code of 10 Constraints

Version 8.1 by Helena K. on 2026/06/09 20:14

Hide last authors
Helena K. 1.1 1 {{box title="**Contents**"}}
2 {{toc/}}
3 {{/box}}
4
Helena K. 1.2 5 == 10.1 Introduction ==
Helena K. 1.1 6
7
Helena K. 8.1 8 [[Constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] are used as a way to restrict what data can be reported, or to report what data exists in a given context.  There are three types of [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]], which serve different purposes
Helena K. 1.1 9
Helena K. 8.1 10 * Availability [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]]
11 * [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]]
12 * Reporting [[Constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]]
Helena K. 1.1 13
Helena K. 8.1 14 An Availability [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] defines the data that exists in the context of a data query.
Helena K. 1.1 15
Helena K. 8.1 16 They form part of the response message from the Availability REST API. Availability [[Constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] are dynamically generated by a system based on the data that exists and the query context.  Availability [[Constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] are therefore not Identifiable structures (they have no URN).
Helena K. 1.1 17
Helena K. 8.1 18 A [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] is a property of a [[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]], they are used to fix the [[Dimensions>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] that they use in the [[Data Structure Definition>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]] which they use. [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] [[Constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] enable [[Data Structure Definitions>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]] to evolve over time by having new [[Dimensions>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] added, without having to undergo a major [[version>>doc:sdmx:Glossary 2\.1.Version.WebHome]] change. 
Helena K. 1.1 19
Helena K. 8.1 20 A Reporting [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] is used to define the set of allowed and/or disallowed values that can be reported in a data or [[metadata set>>doc:sdmx:Glossary 2\.1.Metadata set.WebHome]].
21
Helena K. 1.2 22 == 10.2 Availability Constraint ==
Helena K. 1.1 23
Helena K. 8.1 24 An Availability [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] is not a maintained structure, instead it is generated dynamically as a response to the availability REST API. The purpose of the Availability [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] is to define the distinct set of values that have data over 1 or more [[Dimensions>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]].  Unlike a Data and Metadata [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]], which can attach to multiple Constrainable structures (of the same type), an Availability [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] can only attach to only one structure.  The attachment defines the context of the response (data exists for [[components>>doc:sdmx:Glossary 2\.1.Component.WebHome]] in the context of).  The subset of Constrainable structures the Availability [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] can attach to are:
Helena K. 1.1 25
Helena K. 8.1 26 * [[Data Structure Definition>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]]
27 * [[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]]
28 * [[Provision Agreement>>doc:sdmx:Glossary 2\.1.Provision agreement.WebHome]]
Helena K. 1.1 29
Helena K. 1.2 30 == 10.3 Dimension Constraint ==
31
Helena K. 8.1 32 A [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] is a property of a [[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]]; its purpose is to explicitly list the [[Dimensions>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] from the corresponding [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]] that are being used by the [[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]]. 
Helena K. 1.1 33
Helena K. 8.1 34 [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] [[Constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] were introduced in [[SDMX>>doc:sdmx:Glossary 2\.1.Statistical data and metadata exchange.WebHome]] 3.1 and are not required for most [[Dataflows>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]] where the [[dataset>>doc:sdmx:Glossary 2\.1.Data set.WebHome]] must always contain the full complement of [[Dimensions>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] as defined by the corresponding [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]]. However, for some complex data collections, which may span long periods and where the full complement of required [[Dimensions>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] are not necessarily known at design time, the [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]] is subject to increasing its Dimensionality over time.  In this scenario it is possible to define the [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]] as an evolving structure, this property tells the user that the [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]] can have new [[Dimensions>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] added without having to undergo a major [[version>>doc:sdmx:Glossary 2\.1.Version.WebHome]] change; a [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]] at [[version>>doc:sdmx:Glossary 2\.1.Version.WebHome]] 1.0.0 for example would be able to add a new [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] and move to [[version>>doc:sdmx:Glossary 2\.1.Version.WebHome]] 1.1.0; a change that would not ordinarily be allowed.  A minor [[version>>doc:sdmx:Glossary 2\.1.Version.WebHome]] change on the addition of a new [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] is only possible if the [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]] defines itself as an evolving structure.   This is a new property of the [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]] introduced in [[version>>doc:sdmx:Glossary 2\.1.Version.WebHome]] 3.1 to satisfy this use case.  The evolving structure  property is either true or false, defaulting to false if not specified.  Setting the evolving structure property to true requires a major [[version>>doc:sdmx:Glossary 2\.1.Version.WebHome]] change, and therefore can only be introduced on an x.0.0 release (e.g. 1.0.0).  The evolving structure property can be set to false to indicate that there will be no additional [[Dimensions>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] added to the Data Structure under the same major [[version>>doc:sdmx:Glossary 2\.1.Version.WebHome]] number; setting the evolving structure property to false does not require require a major [[version>>doc:sdmx:Glossary 2\.1.Version.WebHome]] change on the Data Structure.   
Helena K. 1.1 35
Helena K. 8.1 36 When a [[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]] references a [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]], late binding on the minor release, and the [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]] has the evolving structure property set to true, then the [[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]] must contain a [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] to protect its Dimensionality from changing over time without a [[version>>doc:sdmx:Glossary 2\.1.Version.WebHome]] change. 
Helena K. 1.1 37
Helena K. 8.1 38 The [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] provides the explicit list of [[Dimensions>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] that the [[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]] uses from the [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]] that it references.  This enables the [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]] to evolve over time without breaking the compatibility of [[datasets>>doc:sdmx:Glossary 2\.1.Data set.WebHome]] against the [[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]]. 
Helena K. 1.1 39
Helena K. 8.1 40 __**Rules for a [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]]**__
Helena K. 1.1 41
Helena K. 8.1 42 * A [[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]] must contain a [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] if the [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]] which it uses states that it is an evolving structure and the [[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]] is late binding on the minor release (latest minor release of a given major [[version>>doc:sdmx:Glossary 2\.1.Version.WebHome]], e.g. 1.0+.0)
43 * The [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] can only include [[Dimensions>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] from the [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]] that is referenced by the [[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]].
44 * A [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] can only be changed if the [[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]] undergoes a major [[version>>doc:sdmx:Glossary 2\.1.Version.WebHome]] change
45 * [[Datasets>>doc:sdmx:Glossary 2\.1.Data set.WebHome]] reported against the [[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]] must only contain reported values for the [[Dimensions>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] specified in the [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]]. 
46 * When exporting data for the [[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]], the [[dataset>>doc:sdmx:Glossary 2\.1.Data set.WebHome]] should only include the [[Dimensions>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] specified by the [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]].
47 * When exporting data for the [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]] the [[dataset>>doc:sdmx:Glossary 2\.1.Data set.WebHome]] must contain the full set of [[Dimensions>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] as specified by the [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]]. The tilde ‘’ character is used to represent a value which is not present due to the [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] not being included in the corresponding [[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]].
Helena K. 1.1 48
Helena K. 8.1 49 __**Example [[Datasets>>doc:sdmx:Glossary 2\.1.Data set.WebHome]] with Evolving Structures**__
Helena K. 1.1 50
Helena K. 8.1 51 A [[dataset>>doc:sdmx:Glossary 2\.1.Data set.WebHome]] is built against a [[Data Structure Definition>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]].  The [[dataset>>doc:sdmx:Glossary 2\.1.Data set.WebHome]] contains data for two [[Dataflows>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]].  [[Dataflows>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]] ‘DF_POP’ uses a [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] which fixes its [[Dimensions>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] to  FREQ and REF_AREA.  [[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]] ‘DF_POP_SA’ does not reference a [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]], and as such includes all [[Dimensions>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] as specified by the [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]].  
Helena K. 1.1 52
Helena K. 8.1 53 The resulting [[dataset>>doc:sdmx:Glossary 2\.1.Data set.WebHome]] contains values ‘’ for both the [[SEX>>doc:sdmx:Glossary 2\.1.Sex.WebHome]] and [[AGE>>doc:sdmx:Glossary 2\.1.Age.WebHome]] [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] for the [[series>>doc:sdmx:Glossary 2\.1.Series.WebHome]] related to DF_POP.
Helena K. 1.1 54
Helena K. 1.2 55 (% style="width:758.294px" %)
Helena K. 8.1 56 |(% style="width:119px" %)**[[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]]**|(% colspan="7" style="width:635px" %)**FREQ REF_AREA [[SEX>>doc:sdmx:Glossary 2\.1.Sex.WebHome]] [[AGE>>doc:sdmx:Glossary 2\.1.Age.WebHome]] OBS_VALUE TIME_PERIOD [[UNIT>>doc:sdmx:Glossary 2\.1.Statistical unit.WebHome]]**
Helena K. 3.2 57 |(% style="width:119px" %)**DF_POP**|(% style="width:55px" %)A|(% style="width:103px" %)UK|(% style="width:79px" %) |(% style="width:92px" %) |(% style="width:93px" %)65|(% style="width:111px" %)2022|(% style="width:101px" %)6
58 |(% style="width:119px" %)**DF_POP**|(% style="width:55px" %)A|(% style="width:103px" %)FR|(% style="width:79px" %) |(% style="width:92px" %) |(% style="width:93px" %)50|(% style="width:111px" %)2022|(% style="width:101px" %)6
Helena K. 1.2 59 |(% style="width:119px" %)**DF_POP_SA**|(% style="width:55px" %)A|(% style="width:103px" %)UK|(% style="width:79px" %)M|(% style="width:92px" %)1|(% style="width:93px" %)1.2|(% style="width:111px" %)2022|(% style="width:101px" %)6
Helena K. 1.1 60
Helena K. 1.3 61 == 10.4 Reporting Constraints ==
Helena K. 1.1 62
Helena K. 8.1 63 A Reporting [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] is a [[Maintainable Artefact>>doc:sdmx:Glossary 2\.1.Maintainable artefact.WebHome]] which restricts the values that can be reported in a [[dataset>>doc:sdmx:Glossary 2\.1.Data set.WebHome]] or [[metadata set>>doc:sdmx:Glossary 2\.1.Metadata set.WebHome]] based on one or more inclusion or exclusion rules. 
Helena K. 1.1 64
Helena K. 8.1 65 A reporting [[constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] is one of the following concrete types:
Helena K. 1.1 66
Helena K. 8.1 67 * Data [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]]
68 * Metadata [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]]
Helena K. 1.1 69
Helena K. 1.3 70 === 10.4.1 Data Constraint ===
Helena K. 1.2 71
Helena K. 8.1 72 A Data [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] is used to add additional restrictions to the allowable values reported in a [[dataset>>doc:sdmx:Glossary 2\.1.Data set.WebHome]].  Data [[Constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] can be applied to the follow structures which are collectively known as Constrainable structures:
Helena K. 1.1 73
Helena K. 8.1 74 * [[Data Structure Definition>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]]
75 * [[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]]
76 * [[Provision Agreement>>doc:sdmx:Glossary 2\.1.Provision agreement.WebHome]]
77 * [[Data Provider>>doc:sdmx:Glossary 2\.1.Data provider.WebHome]]
Helena K. 1.1 78
Helena K. 8.1 79 **Note** regardless of the Constrainable structure, the restricted values relate to  the allowable content for the [[Component>>doc:sdmx:Glossary 2\.1.Component.WebHome]] of the [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]] to which the constrained object relates. 
Helena K. 1.1 80
Helena K. 1.3 81 === 10.4.2 Metadata Constraint ===
Helena K. 1.1 82
Helena K. 8.1 83 A Metadata [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] is used to add additional restrictions to the allowable values reported in a metadataset.  Metadata [[Constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] can be applied to the follow structures which are collectively known as Constrainable structures:
Helena K. 1.1 84
Helena K. 8.1 85 * [[Metadata Structure Definition>>doc:sdmx:Glossary 2\.1.Metadata structure definition.WebHome]]
86 * [[Metadataflow>>doc:sdmx:Glossary 2\.1.Metadataflow.WebHome]]
87 * Metadata [[Provision Agreement>>doc:sdmx:Glossary 2\.1.Provision agreement.WebHome]]
Helena K. 1.1 88 * Metadata Provider
89
Helena K. 8.1 90 **Note** regardless of the Constrainable structure,  the restricted values relate to  the allowable content for the [[Component>>doc:sdmx:Glossary 2\.1.Component.WebHome]] of the [[MSD>>doc:sdmx:Glossary 2\.1.Metadata structure definition.WebHome]] to which the constrained object relates. 
Helena K. 1.1 91
Helena K. 1.3 92 === 10.4.3 Scope of a Constraint ===
Helena K. 1.1 93
Helena K. 8.1 94 A [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] is used specify the content of a data or metadata source in terms of the [[component>>doc:sdmx:Glossary 2\.1.Component.WebHome]] values or the keys.
Helena K. 1.1 95
Helena K. 8.1 96 In terms of data the [[components>>doc:sdmx:Glossary 2\.1.Component.WebHome]] are:
Helena K. 1.1 97
Helena K. 8.1 98 * [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]]
99 * Time [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]]
100 * Data [[Attribute>>doc:sdmx:Glossary 2\.1.Attribute.WebHome]]
101 * [[Measure>>doc:sdmx:Glossary 2\.1.Measure.WebHome]]
102 * Metadata [[Attribute>>doc:sdmx:Glossary 2\.1.Attribute.WebHome]]
103 * DataKeySets: the keys are the content of the KeyDescriptor – i.e., the [[series keys>>doc:sdmx:Glossary 2\.1.Series key.WebHome]] composed, for each key, by a value for each [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]].
Helena K. 1.1 104
Helena K. 8.1 105 In terms of [[reference metadata>>doc:sdmx:Glossary 2\.1.Reference metadata.WebHome]] the [[components>>doc:sdmx:Glossary 2\.1.Component.WebHome]] are:
Helena K. 1.1 106
Helena K. 8.1 107 * Metadata [[Attribute>>doc:sdmx:Glossary 2\.1.Attribute.WebHome]]
Helena K. 1.1 108
Helena K. 8.1 109 For a [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] based on a [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]] the [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] can reference one or more of:
Helena K. 1.1 110
Helena K. 8.1 111 * [[Data Structure Definition>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]]
112 * [[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]]
113 * [[Provision Agreement>>doc:sdmx:Glossary 2\.1.Provision agreement.WebHome]]
114 * [[Data Provider>>doc:sdmx:Glossary 2\.1.Data provider.WebHome]]
Helena K. 1.1 115
Helena K. 8.1 116 For a [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] based on an [[MSD>>doc:sdmx:Glossary 2\.1.Metadata structure definition.WebHome]] the [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] can reference one or more of:
Helena K. 1.1 117
Helena K. 8.1 118 * [[Metadata Structure Definition>>doc:sdmx:Glossary 2\.1.Metadata structure definition.WebHome]]
119 * [[Metadataflow>>doc:sdmx:Glossary 2\.1.Metadataflow.WebHome]]
120 * Metadata [[Provision Agreement>>doc:sdmx:Glossary 2\.1.Provision agreement.WebHome]]
Helena K. 1.1 121 * Metadata Provider
Helena K. 8.1 122 * [[Metadata Set>>doc:sdmx:Glossary 2\.1.Metadata set.WebHome]]
Helena K. 1.1 123
Helena K. 8.1 124 Furthermore, there can be more than one [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] specified for a specific object e.g., more than one [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] for a specific [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]].
Helena K. 1.1 125
Helena K. 8.1 126 In view of the flexibility of [[constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] attachment, clear rules on their usage are required. These are elaborated below.
Helena K. 1.1 127
Helena K. 1.3 128 === 10.4.4 Multiple Constraints ===
Helena K. 1.1 129
Helena K. 8.1 130 There can be many [[Constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] for any Constrainable [[Artefact>>doc:sdmx:Glossary 2\.1.Artefact.WebHome]] (e.g., [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]]), subject to the following restrictions:
Helena K. 1.1 131
Helena K. 1.3 132 ==== 10.4.4.1 Cube Region ====
Helena K. 1.1 133
Helena K. 8.1 134 A [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] can contain multiple [[Member Selections>>doc:sdmx:Glossary 2\.1.Member selection.WebHome]] (e.g., [[Dimensions>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]]).
Helena K. 1.1 135
Helena K. 8.1 136 * A specific [[Member Selection>>doc:sdmx:Glossary 2\.1.Member selection.WebHome]] (e.g., [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] FREQ) can only be contained in one Cube Region for any one attached object (e.g., a specific [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]] or specific [[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]]).
137 * [[Component>>doc:sdmx:Glossary 2\.1.Component.WebHome]] values within a [[Member Selection>>doc:sdmx:Glossary 2\.1.Member selection.WebHome]] may define a validity period. Otherwise, the value is valid for the whole validity of the Cube Region.
138 * For partial reference resolution purposes (as per the [[SDMX>>doc:sdmx:Glossary 2\.1.Statistical data and metadata exchange.WebHome]] REST API), the latest non-draft [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] must be considered.
139 * A [[Member Selection>>doc:sdmx:Glossary 2\.1.Member selection.WebHome]] may include wildcarding of values (using character ‘%’ to represent zero or more occurrences of any character), as well as cascading through hierarchic structures (e.g., parents in [[Codelist>>doc:sdmx:Glossary 2\.1.Code list.WebHome]]), or localised values (e.g., text for English only). Lack of locale means any [[language>>doc:sdmx:Glossary 2\.1.Language.WebHome]] may match. Cascading values are mutual exclusive to localised values, as the former refer to coded values, while the latter refer to uncoded values.
140 * Any values included in a [[Member Selection>>doc:sdmx:Glossary 2\.1.Member selection.WebHome]] for [[Components>>doc:sdmx:Glossary 2\.1.Component.WebHome]] with an array data type (i.e., [[Measures>>doc:sdmx:Glossary 2\.1.Measure.WebHome]], [[Attributes>>doc:sdmx:Glossary 2\.1.Attribute.WebHome]] or Metadata [[Attributes>>doc:sdmx:Glossary 2\.1.Attribute.WebHome]]), will be applied as single values and will not be assessed combined with other values to match all possible array values. For example, including the [[Code>>doc:sdmx:Glossary 2\.1.Code.WebHome]] ‘A’ for an [[Attribute>>doc:sdmx:Glossary 2\.1.Attribute.WebHome]] will allow any instance of the [[Attribute>>doc:sdmx:Glossary 2\.1.Attribute.WebHome]] that includes ‘A’, like [‘A’, ‘B’] or [‘A’, ‘C’, ‘D’]. Similarly, if [[Code>>doc:sdmx:Glossary 2\.1.Code.WebHome]] ‘A’ was excluded, all those arrays of values would also be excluded.
Helena K. 1.1 141
Helena K. 1.2 142 ==== 10.4.4.2 Key Set ====
Helena K. 1.1 143
Helena K. 8.1 144 Key Sets will be processed in the order they appear in the [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] and wildcards can be used (e.g., any key position not reference explicitly is deemed to be "all values").
Helena K. 1.1 145
Helena K. 8.1 146 As the Key Sets can be "included" or "excluded" it is recommended that Key Sets with wildcards are declared before KeySets with specific [[series keys>>doc:sdmx:Glossary 2\.1.Series key.WebHome]]. This will minimize the risk that keys are inadvertently included or excluded.
Helena K. 1.1 147
Helena K. 8.1 148 In addition, [[Attribute>>doc:sdmx:Glossary 2\.1.Attribute.WebHome]], [[Measure>>doc:sdmx:Glossary 2\.1.Measure.WebHome]] and Metadata [[Attribute>>doc:sdmx:Glossary 2\.1.Attribute.WebHome]] [[constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] may accompany KeySets, in order to specify the allowed values per Key. Those are expressed following the rules for Cube Regions, as explained above.
Helena K. 1.1 149
150 Finally, a validity period may be specified per Key.
151
Helena K. 1.2 152 === 10.4.4 Versioning ===
Helena K. 1.1 153
Helena K. 8.1 154 When Data and Metadata [[Constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] are versioned, the latest [[version>>doc:sdmx:Glossary 2\.1.Version.WebHome]] of the [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] is used to generate the reporting restriction rules; all previous [[versions>>doc:sdmx:Glossary 2\.1.Version.WebHome]] are for historical information only.
Helena K. 1.1 155
Helena K. 8.1 156 If restrictions are applicable to certain periods in time, the validFrom and validTo properties can be set on the specific values. This allows [[Constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] to evolve over time, increasing their [[version>>doc:sdmx:Glossary 2\.1.Version.WebHome]] number as they do so, whilst being able to maintain a complete set of reporting restrictions for current and past [[datasets>>doc:sdmx:Glossary 2\.1.Data set.WebHome]].
Helena K. 1.1 157
158 Example:
159
Helena K. 8.1 160 Data [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] 1.0.0
Helena K. 1.1 161
Helena K. 1.4 162 (% style="width:573.294px" %)
Helena K. 8.1 163 |(% style="width:108px" %)[[Component>>doc:sdmx:Glossary 2\.1.Component.WebHome]]|(% style="width:127px" %)Valid Value|(% style="width:150px" %)Valid from|(% style="width:185px" %)Valid to
Helena K. 1.4 164 |(% rowspan="3" style="width:108px" %)COUNTRY|(% style="width:127px" %)UK|(% style="width:150px" %) |(% style="width:185px" %)
165 |(% style="width:127px" %)FR|(% style="width:150px" %) |(% style="width:185px" %)
166 |(% style="width:127px" %)DE|(% style="width:150px" %) |(% style="width:185px" %)
Helena K. 1.1 167
Helena K. 8.1 168 Data [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] 1.1.0
Helena K. 1.1 169
Helena K. 1.4 170 (% style="width:576.294px" %)
Helena K. 8.1 171 |(% style="width:110px" %)[[Component>>doc:sdmx:Glossary 2\.1.Component.WebHome]]|(% style="width:129px" %)Valid Value|(% style="width:145px" %)Valid from|(% style="width:189px" %)Valid to
Helena K. 1.4 172 |(% rowspan="3" style="width:110px" %)COUNTRY|(% style="width:129px" %)UK|(% style="width:145px" %) |(% style="width:189px" %)
173 |(% style="width:129px" %)FR|(% style="width:145px" %) |(% style="width:189px" %)2012
174 |(% style="width:129px" %)DE|(% style="width:145px" %) |(% style="width:189px" %)
Helena K. 1.1 175
Helena K. 8.1 176 When both [[versions>>doc:sdmx:Glossary 2\.1.Version.WebHome]] of the Data [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] are in a system, an [[observation value>>doc:sdmx:Glossary 2\.1.Observation value.WebHome]] reported against COUNTRY FR for [[time period>>doc:sdmx:Glossary 2\.1.Time period.WebHome]] 2013 would be deemed invalid as the 1.1.0 rule would be applied.
Helena K. 1.1 177
Helena K. 1.2 178 === 10.4.6 Inheritance ===
Helena K. 1.1 179
Helena K. 1.2 180 ==== 10.4.6.1 Attachment levels of a Constraint ====
Helena K. 1.1 181
Helena K. 8.1 182 There are three [[levels>>doc:sdmx:Glossary 2\.1.Level.WebHome]] of [[constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] attachment for which these inheritance rules apply:
Helena K. 1.1 183
Helena K. 8.1 184 * [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]]/[[MSD>>doc:sdmx:Glossary 2\.1.Metadata structure definition.WebHome]] – top [[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]]
185 ** [[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]]/[[Metadataflow>>doc:sdmx:Glossary 2\.1.Metadataflow.WebHome]] – second [[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]]
186 *** [[Provision Agreement>>doc:sdmx:Glossary 2\.1.Provision agreement.WebHome]] – third [[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]]
Helena K. 1.1 187
Helena K. 8.1 188 It is not necessary for a [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] to be attached to a higher [[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]] [[artefact>>doc:sdmx:Glossary 2\.1.Artefact.WebHome]]. e.g., it is valid to have a [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] for a [[Provision Agreement>>doc:sdmx:Glossary 2\.1.Provision agreement.WebHome]] where there are no [[constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] attached the relevant [[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]] or [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]].
Helena K. 1.1 189
Helena K. 1.2 190 ==== 10.4.6.2 Cascade rules for processing Constraints ====
Helena K. 1.1 191
Helena K. 8.1 192 The processing of the [[constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] on either [[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]]/[[Metadataflow>>doc:sdmx:Glossary 2\.1.Metadataflow.WebHome]] or [[Provision Agreement>>doc:sdmx:Glossary 2\.1.Provision agreement.WebHome]] must take into account the [[constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] declared at higher [[levels>>doc:sdmx:Glossary 2\.1.Level.WebHome]]. The rules for the lower-[[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]] [[constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] (attached to [[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]]/ [[Metadataflow>>doc:sdmx:Glossary 2\.1.Metadataflow.WebHome]] and [[Provision Agreement>>doc:sdmx:Glossary 2\.1.Provision agreement.WebHome]]) are detailed below.
Helena K. 1.1 193
Helena K. 8.1 194 Note that there can be a situation where a [[constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] is specified at a lower [[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]] before a [[constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] is specified at a higher [[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]]. Therefore, it is possible that a higher-[[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]] [[constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] makes a lower-[[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]] [[constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] invalid. [[SDMX>>doc:sdmx:Glossary 2\.1.Statistical data and metadata exchange.WebHome]] makes no rules on how such a conflict should be handled when processing the [[constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] for attachment. However, the cascade rules on evaluating [[constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] for usage are clear – the higher-[[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]] [[constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] takes precedence in any conflicts that result in a less restrictive specification at the lower [[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]].
Helena K. 1.1 195
Helena K. 1.2 196 ==== 10.4.6.3 Cube Region ====
Helena K. 1.1 197
Helena K. 8.1 198 It is not necessary to have a [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] on the higher-[[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]] [[artefact>>doc:sdmx:Glossary 2\.1.Artefact.WebHome]] (e.g., [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]] referenced by the [[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]]), but if there is such a [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] at the higher [[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]](s) then:
Helena K. 1.1 199
Helena K. 8.1 200 * The lower-[[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]] [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] cannot be less restrictive than the [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] specified for the same [[Member Selection>>doc:sdmx:Glossary 2\.1.Member selection.WebHome]] (e.g. [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]]) at the next higher [[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]], which constrains that [[Member Selection>>doc:sdmx:Glossary 2\.1.Member selection.WebHome]]. For example, if the [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] FREQ is constrained to A, Q in a [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]], then the [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] at the [[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]] or [[Provision Agreement>>doc:sdmx:Glossary 2\.1.Provision agreement.WebHome]] cannot be A, Q, M or even just M – it can only further constrain A, Q.
201 * The [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] at the lower [[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]] for any one [[Member Selection>>doc:sdmx:Glossary 2\.1.Member selection.WebHome]] further constrains the content for the same [[Member Selection>>doc:sdmx:Glossary 2\.1.Member selection.WebHome]] at the higher [[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]](s).
202 * Any [[Member Selection>>doc:sdmx:Glossary 2\.1.Member selection.WebHome]], which is not referenced in a [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]], is deemed to be constrained according to the [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] specified at the next higher [[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]] which [[constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] that [[Member Selection>>doc:sdmx:Glossary 2\.1.Member selection.WebHome]].
203 * If there is a conflict when resolving the [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] in terms of a lower-[[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]] [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] being less restrictive than a higher-[[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]] [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]], then the [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] at the higher-[[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]] is used.
Helena K. 1.1 204
Helena K. 8.1 205 Note that it is possible for a [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] at a higher [[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]] to constrain, say, four [[Dimensions>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] in a single [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]], and a [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] at a lower [[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]] to constrain the same four in two, three, or four [[Constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]].
Helena K. 1.1 206
Helena K. 1.2 207 ==== 10.4.6.4 Key Set ====
Helena K. 1.1 208
Helena K. 8.1 209 It is not necessary to have a [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] on the higher-[[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]] [[artefact>>doc:sdmx:Glossary 2\.1.Artefact.WebHome]] (e.g., [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]] referenced by the [[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]]), but if there is such a [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] at the higher [[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]](s) then:
Helena K. 1.1 210
Helena K. 8.1 211 * The lower-[[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]] [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] cannot be less restrictive than the [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] specified at the higher [[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]].
212 * The [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] at the lower [[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]] for any one [[Member Selection>>doc:sdmx:Glossary 2\.1.Member selection.WebHome]] further constrains the keys specified at the higher [[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]](s).
213 * Any [[Member Selection>>doc:sdmx:Glossary 2\.1.Member selection.WebHome]], which is not referenced in a [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]], is deemed to be constrained according to the [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] specified at the next higher [[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]] which [[constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] that [[Member Selection>>doc:sdmx:Glossary 2\.1.Member selection.WebHome]].
214 * If there is a conflict when resolving the keys in the [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] at two [[levels>>doc:sdmx:Glossary 2\.1.Level.WebHome]], in terms of a lower-[[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]] [[constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] being less restrictive than a higher-[[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]] [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]], then the offending keys specified at the lower [[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]] are not deemed part of the [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]].
Helena K. 1.1 215
Helena K. 8.1 216 Note that a Key in a Key Set can have wildcarded [[Components>>doc:sdmx:Glossary 2\.1.Component.WebHome]]. For instance, the [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] may simply constrain the [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] FREQ to "A", and all keys where the FREQ="A" are therefore valid.
Helena K. 1.1 217
218 The following logic explains how the inheritance mechanism works. Note that this is conceptual logic and actual systems may differ in the way this is implemented.
219
Helena K. 8.1 220 1. Determine all possible keys that are valid at the higher [[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]].
221 1. These keys are deemed to be inherited by the lower-[[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]] constrained object, subject to the [[Constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] specified at the lower [[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]].
222 1. Determine all possible keys that are possible using the [[Constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] specified at the lower [[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]].
223 1. At the lower [[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]] inherit all keys that match with the higher-[[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]] [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]].
224 1. If there are keys in the lower-[[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]] [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] that are not inherited then the key is invalid (i.e., it is less restrictive).
Helena K. 1.1 225
Helena K. 1.5 226 === 10.4.7 Constraints Examples ===
227
Helena K. 1.2 228 ==== 10.4.7.1 Data Constraint and Cascading ====
Helena K. 1.1 229
Helena K. 1.2 230 The following scenario is used.
231
Helena K. 8.1 232 A [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]] contains the following [[Dimensions>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]]:
Helena K. 1.1 233
234 * GEO – Geography
Helena K. 8.1 235 * [[SEX>>doc:sdmx:Glossary 2\.1.Sex.WebHome]] – [[Sex>>doc:sdmx:Glossary 2\.1.Sex.WebHome]]
236 * [[AGE>>doc:sdmx:Glossary 2\.1.Age.WebHome]] – [[Age>>doc:sdmx:Glossary 2\.1.Age.WebHome]]
Helena K. 1.1 237 * CAS – Current Activity Status
238
Helena K. 8.1 239 In the [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]], common [[code lists>>doc:sdmx:Glossary 2\.1.Code list.WebHome]] are used and the requirement is to restrict these at various [[levels>>doc:sdmx:Glossary 2\.1.Level.WebHome]] to specify the actual [[code>>doc:sdmx:Glossary 2\.1.Code.WebHome]] that are valid for the object to which the [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] is attached.
Helena K. 1.1 240
Helena K. 1.6 241 [[image:1750065279010-260.png]]
Helena K. 1.1 242
Helena K. 8.1 243 **Figure 20: Example Scenario for [[Constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] **
Helena K. 1.1 244
Helena K. 8.1 245 [[Constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] are declared as follows:
Helena K. 3.3 246
Helena K. 1.6 247 [[image:1750065319060-899.png]]
Helena K. 1.1 248
Helena K. 8.1 249 **Figure 21: Example [[Constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]]**
Helena K. 1.1 250
251 Notes:
252
Elena Yasinovskaya 4.2 253
Helena K. 8.1 254 [[AGE>>doc:sdmx:Glossary 2\.1.Age.WebHome]] is constrained for the [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]] and is further restricted for the [[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]] CENSUS_CUBE1.
Helena K. 1.1 255
Helena K. 8.1 256 * The same [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] applies to both [[Provision Agreements>>doc:sdmx:Glossary 2\.1.Provision agreement.WebHome]].
Helena K. 1.1 257
258 The cascade rules elaborated above result as follows:
259
Helena K. 8.1 260 [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]]
Helena K. 1.1 261
Helena K. 8.1 262 * Constrained by eliminating [[code>>doc:sdmx:Glossary 2\.1.Code.WebHome]] 001 from the [[code list>>doc:sdmx:Glossary 2\.1.Code list.WebHome]] for the [[AGE>>doc:sdmx:Glossary 2\.1.Age.WebHome]] [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]].
Helena K. 1.1 263
Helena K. 8.1 264 [[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]] CENSUS_CUBE1
Helena K. 1.1 265
Helena K. 8.1 266 * Constrained by restricting the [[code list>>doc:sdmx:Glossary 2\.1.Code list.WebHome]] for the [[AGE>>doc:sdmx:Glossary 2\.1.Age.WebHome]] [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] to [[codes>>doc:sdmx:Glossary 2\.1.Code.WebHome]] 002 and 003 (note that this is a more restrictive [[constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] than that declared for the [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]] which specifies all [[codes>>doc:sdmx:Glossary 2\.1.Code.WebHome]] except [[code>>doc:sdmx:Glossary 2\.1.Code.WebHome]] 001).
267 ** Restricts the CAS [[codes>>doc:sdmx:Glossary 2\.1.Code.WebHome]] to 003 and 004.
Helena K. 1.1 268
Helena K. 8.1 269 [[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]] CENSUS_CUBE2
Helena K. 1.1 270
Helena K. 8.1 271 * Restricts the [[code list>>doc:sdmx:Glossary 2\.1.Code list.WebHome]] for the CAS [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] to [[codes>>doc:sdmx:Glossary 2\.1.Code.WebHome]] TOT and NAP.
272 ** Inherits the [[AGE>>doc:sdmx:Glossary 2\.1.Age.WebHome]] [[constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] applied at the [[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]] of the [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]].
Helena K. 1.1 273
Helena K. 8.1 274 [[Provision Agreement>>doc:sdmx:Glossary 2\.1.Provision agreement.WebHome]] CENSUS_CUBE1_IT
Helena K. 1.1 275
Helena K. 8.1 276 * Restricts the [[codes>>doc:sdmx:Glossary 2\.1.Code.WebHome]] for the GEO [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] to IT and its children.
277 ** Inherits the [[constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] from [[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]] CENSUS_CUBE1 for the [[AGE>>doc:sdmx:Glossary 2\.1.Age.WebHome]] and CAS [[Dimensions>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]].
Helena K. 1.1 278
Helena K. 8.1 279 [[Provision Agreement>>doc:sdmx:Glossary 2\.1.Provision agreement.WebHome]] CENSUS_CUBE2_IT
Helena K. 1.1 280
Helena K. 8.1 281 * Restricts the [[codes>>doc:sdmx:Glossary 2\.1.Code.WebHome]] for the GEO [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] to IT and its children.
282 ** Inherits the [[constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] from [[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]] CENSUS_CUBE2 for the CAS [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]].
283 ** Inherits the [[AGE>>doc:sdmx:Glossary 2\.1.Age.WebHome]] [[constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] applied at the [[level>>doc:sdmx:Glossary 2\.1.Level.WebHome]] of the [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]].
Helena K. 1.1 284
Helena K. 8.1 285 The [[Constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] are defined as follows:
Helena K. 1.1 286
Helena K. 8.1 287 [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]] [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]]
Helena K. 1.1 288
Helena K. 1.8 289 [[image:1750065367824-357.png]]
Helena K. 1.7 290
Helena K. 8.1 291 [[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]] [[Constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]]
Helena K. 1.1 292
Helena K. 1.8 293 [[image:1750065392163-400.png]]
Helena K. 1.7 294
Helena K. 8.1 295 [[Provision Agreement>>doc:sdmx:Glossary 2\.1.Provision agreement.WebHome]] [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]]
Helena K. 1.1 296
Helena K. 1.8 297 [[image:1750065461589-995.png]]
Helena K. 1.7 298
Helena K. 8.1 299 **10.4.7.2 Combination of [[Constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]]**
Helena K. 1.1 300
301 The possible combination of constraining terms are explained in this section, following a few examples.
302
Helena K. 8.1 303 Let’s assume a [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]] with the following [[Components>>doc:sdmx:Glossary 2\.1.Component.WebHome]]:
Helena K. 1.1 304
Helena K. 1.10 305 (% style="width:459.294px" %)
Helena K. 8.1 306 |(% style="width:204px" %)(% style="color:#3498db" %)[[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]]|(% style="width:252px" %)(% style="color:#3498db" %)FREQ
307 |(% style="width:204px" %)(% style="color:#3498db" %)[[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]]|(% style="width:252px" %)(% style="color:#3498db" %)JD_TYPE
308 |(% style="width:204px" %)(% style="color:#3498db" %)[[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]]|(% style="width:252px" %)(% style="color:#3498db" %)JD_CATEGORY
309 |(% style="width:204px" %)(% style="color:#3498db" %)[[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]]|(% style="width:252px" %)(% style="color:#3498db" %)VIS_CTY
Helena K. 1.10 310 |(% style="width:204px" %)(% style="color:#2980b9" %)TimeDimension|(% style="width:252px" %)(% style="color:#2980b9" %)TIME_PERIOD
Helena K. 8.1 311 |(% style="width:204px" %)(% style="color:#16a085" %)[[Attribute>>doc:sdmx:Glossary 2\.1.Attribute.WebHome]]|(% style="width:252px" %)(% style="color:#16a085" %)OBS_STATUS
312 |(% style="width:204px" %)(% style="color:#16a085" %)[[Attribute>>doc:sdmx:Glossary 2\.1.Attribute.WebHome]]|(% style="width:252px" %)(% style="color:#16a085" %)[[UNIT>>doc:sdmx:Glossary 2\.1.Statistical unit.WebHome]]
313 |(% style="width:204px" %)(% style="color:#16a085" %)[[Attribute>>doc:sdmx:Glossary 2\.1.Attribute.WebHome]]|(% style="width:252px" %)(% style="color:#16a085" %)[[COMMENT>>doc:sdmx:Glossary 2\.1.Comment.WebHome]]
314 |(% style="width:204px" %)(% style="color:#f39c12" %)MetadataAttribute|(% style="width:252px" %)[[CONTACT>>doc:sdmx:Glossary 2\.1.Contact.WebHome]]
315 |(% style="width:204px" %)[[Measure>>doc:sdmx:Glossary 2\.1.Measure.WebHome]]|(% style="width:252px" %)MULTISELECT
316 |(% style="width:204px" %)[[Measure>>doc:sdmx:Glossary 2\.1.Measure.WebHome]]|(% style="width:252px" %)CHOICE
Helena K. 1.1 317
318 On the above, let’s assume the following use cases with their constraining requirements:
319
Helena K. 8.1 320 **Use Case 1: A [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] on allowed values for some [[Dimensions>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]]**
Helena K. 1.1 321
322 R1: Allow monthly and quarterly data
323
324 R2: Allow Mexico for vis-à-vis country
325
326 This is expressed with the following CubeRegion:
327
Helena K. 1.11 328 (% style="width:287.294px" %)
329 |(% style="width:131px" %)(% style="color:#3498db" %)FREQ|(% style="width:153px" %)(% style="color:#3498db" %)M, Q
330 |(% style="width:131px" %)(% style="color:#3498db" %)VIS_CTY|(% style="width:153px" %)(% style="color:#3498db" %)MX
Helena K. 1.1 331
Helena K. 8.1 332 **Use Case 2: A [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] on allowed combinations for some [[Dimensions>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]]**
Helena K. 1.1 333
334 R1: Allow monthly data for Germany
335
336 R2: Allow quarterly data for Mexico
337
338 This is expressed with the following DataKeySet:
339
Helena K. 1.12 340 (% style="width:388.294px" %)
341 |(% style="width:105px" %)(% style="color:#2980b9" %)Key1|(% style="width:137px" %)(% style="color:#2980b9" %)FREQ|(% style="width:143px" %)(% style="color:#2980b9" %)M
342 |(% style="width:105px" %) |(% style="width:137px" %)(% style="color:#2980b9" %)VIS_CTY|(% style="width:143px" %)(% style="color:#2980b9" %)DE
343 |(% rowspan="2" style="width:105px" %)(% style="color:#2980b9" %)Key2|(% style="width:137px" %)(% style="color:#2980b9" %)FREQ|(% style="width:143px" %)(% style="color:#2980b9" %)Q
344 |(% style="width:137px" %)(% style="color:#2980b9" %)VIS_CTY|(% style="width:143px" %)(% style="color:#2980b9" %)MX
Helena K. 1.1 345
Helena K. 8.1 346 **Use Case 3: A [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] on allowed values for some [[Dimensions>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] combined with allowed values for some [[Attributes>>doc:sdmx:Glossary 2\.1.Attribute.WebHome]]** R1: Allow monthly and quarterly data
Helena K. 1.1 347
348 R2: Allow Mexico for vis-à-vis country
349
350 R3: Allow present for status
351
352 This may be expressed with the following CubeRegion:
353
Helena K. 1.13 354 (% style="width:285.294px" %)
355 |(% style="width:143px" %)(% style="color:#2980b9" %)FREQ|(% style="width:139px" %)(% style="color:#2980b9" %)M, Q
356 |(% style="width:143px" %)(% style="color:#2980b9" %)VIS_CTY|(% style="width:139px" %)(% style="color:#2980b9" %)MX
357 |(% style="width:143px" %)(% style="color:#27ae60" %)OBS_STATUS|(% style="width:139px" %)(% style="color:#27ae60" %)A
Helena K. 1.1 358
Helena K. 8.1 359 **Use Case 4: A [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] on allowed combinations for some [[Dimensions>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] combined with specific [[Attribute>>doc:sdmx:Glossary 2\.1.Attribute.WebHome]] values**
Helena K. 1.1 360
Helena K. 8.1 361 R1: Allow monthly data, for Germany, with [[unit>>doc:sdmx:Glossary 2\.1.Statistical unit.WebHome]] euro
Helena K. 1.1 362
Helena K. 8.1 363 R2: Allow quarterly data, for Mexico, with [[unit>>doc:sdmx:Glossary 2\.1.Statistical unit.WebHome]] usd
Helena K. 1.1 364
365 This may be expressed with the following DataKeySet:
366
Helena K. 1.14 367 (% style="width:389.294px" %)
368 |(% rowspan="3" style="width:89px" %)(% style="color:#2980b9" %)Key1|(% style="width:153px" %)(% style="color:#2980b9" %)FREQ|(% style="width:142px" %)(% style="color:#2980b9" %)M
369 |(% style="width:153px" %)(% style="color:#2980b9" %)VIS_CTY|(% style="width:142px" %)(% style="color:#2980b9" %)DE
Helena K. 8.1 370 |(% style="width:153px" %)(% style="color:#27ae60" %)[[UNIT>>doc:sdmx:Glossary 2\.1.Statistical unit.WebHome]]|(% style="width:142px" %)(% style="color:#27ae60" %)EUR
Helena K. 1.14 371 |(% rowspan="3" style="width:89px" %)(% style="color:#2980b9" %)Key2|(% style="width:153px" %)(% style="color:#2980b9" %)FREQ|(% style="width:142px" %)(% style="color:#2980b9" %)Q
372 |(% style="width:153px" %)(% style="color:#2980b9" %)VIS_CTY|(% style="width:142px" %)(% style="color:#2980b9" %)MX
Helena K. 8.1 373 |(% style="width:153px" %)(% style="color:#27ae60" %)[[UNIT>>doc:sdmx:Glossary 2\.1.Statistical unit.WebHome]]|(% style="width:142px" %)(% style="color:#27ae60" %)USD
Helena K. 1.1 374
Helena K. 8.1 375 **Use Case 5: A [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] on allowed values for some [[Dimensions>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] together with some combination of [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] values**
Helena K. 1.1 376
377 R1: For annually and quarterly data, for Mexico and Germany, only A status is allowed
378
379 R2: For monthly data, for Mexico and Germany, only F status is allowed
380
381 Considering the above examples, the following CubeRegions would be created:
382
Helena K. 1.15 383 (% style="width:449.294px" %)
384 |(% rowspan="3" style="width:126px" %)(% style="color:#2980b9" %)CubeRegion1|(% style="width:137px" %)(% style="color:#2980b9" %)FREQ|(% style="width:183px" %)(% style="color:#2980b9" %)Q, A
385 |(% style="width:137px" %)(% style="color:#2980b9" %)VIS_CTY|(% style="width:183px" %)(% style="color:#2980b9" %)MX, DE
386 |(% style="width:137px" %)(% style="color:#27ae60" %)OBS_STATUS|(% style="width:183px" %)(% style="color:#27ae60" %)A
387 |(% rowspan="3" style="width:126px" %)(% style="color:#2980b9" %)CubeRegion2|(% style="width:137px" %)(% style="color:#2980b9" %)FREQ|(% style="width:183px" %)(% style="color:#2980b9" %)M
388 |(% style="width:137px" %)(% style="color:#2980b9" %)VIS_CTY|(% style="width:183px" %)(% style="color:#2980b9" %)MX, DE
389 |(% style="width:137px" %)(% style="color:#27ae60" %)OBS_STATUS|(% style="width:183px" %)(% style="color:#27ae60" %)F
Helena K. 1.1 390
Helena K. 8.1 391 The problem with this approach is that according to the business rule for [[Constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]], only one should be specified per [[Component>>doc:sdmx:Glossary 2\.1.Component.WebHome]]. Thus, if a software would perform some conflict resolution would end up with empty sets for FREQ and OBS_STATUS (as they do not share any values).
Helena K. 1.1 392
Helena K. 8.1 393 Nevertheless, there is a much easier approach to that; this is the cascading mechanism of [[Constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] (as shown in 10.4.7.1). Hence, these rules would be expressed into two [[levels>>doc:sdmx:Glossary 2\.1.Level.WebHome]] of [[Constraints>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]], e.g., [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]] and [[Dataflows>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]]:
Helena K. 1.1 394
Helena K. 8.1 395 [[DSD>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]] CubeRegion:
Helena K. 1.1 396
Helena K. 1.15 397 (% style="width:280.294px" %)
Helena K. 1.16 398 |(% style="width:156px" %)(% style="color:#2980b9" %)FREQ|(% style="width:121px" %)(% style="color:#2980b9" %)M, Q, A
399 |(% style="width:156px" %)(% style="color:#2980b9" %)VIS_CTY|(% style="width:121px" %)(% style="color:#2980b9" %)MX, DE
400 |(% style="width:156px" %)(% style="color:#27ae60" %)OBS_STATUS|(% style="width:121px" %)(% style="color:#27ae60" %)A, F
Helena K. 1.1 401
402 Dataflow1 CubeRegion:
403
Helena K. 1.15 404 (% style="width:285.294px" %)
Helena K. 1.16 405 |(% style="width:157px" %)(% style="color:#2980b9" %)FREQ|(% style="width:125px" %)(% style="color:#2980b9" %)Q, A
406 |(% style="width:157px" %)(% style="color:#2980b9" %)VIS_CTY|(% style="width:125px" %)(% style="color:#2980b9" %)MX, DE
407 |(% style="width:157px" %)(% style="color:#27ae60" %)OBS_STATUS|(% style="width:125px" %)(% style="color:#27ae60" %)F
Helena K. 1.1 408
409 Dataflow2 CubeRegion:
410
Helena K. 1.15 411 (% style="width:288.294px" %)
Helena K. 1.16 412 |(% style="width:159px" %)(% style="color:#2980b9" %)FREQ|(% style="width:126px" %)(% style="color:#2980b9" %)M
413 |(% style="width:159px" %)(% style="color:#2980b9" %)VIS_CTY|(% style="width:126px" %)(% style="color:#2980b9" %)MX, DE
414 |(% style="width:159px" %)(% style="color:#27ae60" %)OBS_STATUS|(% style="width:126px" %)(% style="color:#27ae60" %)A
Helena K. 1.1 415
Helena K. 8.1 416 **Use case 6: A [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] on allowed values for some [[Dimensions>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] combined with allowed values for [[Measures>>doc:sdmx:Glossary 2\.1.Measure.WebHome]]**
Helena K. 1.1 417
Helena K. 8.1 418 R1: Allow monthly data, for Germany, with [[unit>>doc:sdmx:Glossary 2\.1.Statistical unit.WebHome]] euro, and [[measure>>doc:sdmx:Glossary 2\.1.Measure.WebHome]] choice is  'A' R2: Allow quarterly data, for Mexico, with [[unit>>doc:sdmx:Glossary 2\.1.Statistical unit.WebHome]] usd, and [[measure>>doc:sdmx:Glossary 2\.1.Measure.WebHome]] choice is  'B'
Helena K. 1.1 419
420 This may be expressed with the following DataKeySet:
421
Helena K. 1.17 422 (% style="width:404.294px" %)
423 |(% rowspan="4" style="width:99px" %)(% style="color:#2980b9" %)Key1|(% style="width:153px" %)(% style="color:#2980b9" %)FREQ|(% style="width:149px" %)(% style="color:#2980b9" %)M
424 |(% style="width:153px" %)(% style="color:#2980b9" %)VIS_CTY|(% style="width:149px" %)(% style="color:#2980b9" %)DE
Helena K. 8.1 425 |(% style="width:153px" %)(% style="color:#27ae60" %)[[UNIT>>doc:sdmx:Glossary 2\.1.Statistical unit.WebHome]]|(% style="width:149px" %)(% style="color:#27ae60" %)EUR
426 |(% style="width:153px" %)CHOICE|(% style="width:149px" %)A
Helena K. 1.17 427 |(% rowspan="4" style="width:99px" %)(% style="color:#2980b9" %)Key2|(% style="width:153px" %)(% style="color:#2980b9" %)FREQ|(% style="width:149px" %)(% style="color:#2980b9" %)Q
428 |(% style="width:153px" %)(% style="color:#2980b9" %)VIS_CTY|(% style="width:149px" %)(% style="color:#2980b9" %)MX
Helena K. 8.1 429 |(% style="width:153px" %)(% style="color:#27ae60" %)[[UNIT>>doc:sdmx:Glossary 2\.1.Statistical unit.WebHome]]|(% style="width:149px" %)(% style="color:#27ae60" %)USD
430 |(% style="width:153px" %)CHOICE|(% style="width:149px" %)B
Helena K. 1.1 431
Helena K. 8.1 432 **Use Case 7: A [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] with wildcards for [[Codes>>doc:sdmx:Glossary 2\.1.Code.WebHome]] and removePrefix property**
Helena K. 1.1 433
Helena K. 8.1 434 For this example, we assume that the VIS_CTY [[representation>>doc:sdmx:Glossary 2\.1.Representation.WebHome]] has been prefixed with prefix ‘AREA_’. In this [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]], we need to remove the prefix.
Helena K. 3.2 435
Helena K. 1.1 436 R1: Allow monthly and quarterly data
437
438 R2: Allow vis-à-vis countries that start with M
439
440 R3: Remove the prefix ‘AREA_’
441
442 This may be expressed with the following CubeRegion:
443
Helena K. 2.1 444 (% style="width:379.294px" %)
445 |(% style="width:264px" %)(% style="color:#2980b9" %)FREQ|(% style="width:112px" %)(% style="color:#2980b9" %)M, Q
446 |(% style="width:264px" %)(% style="color:#2980b9" %)VIS_CTY (removePrefix=’AREA_’)|(% style="width:112px" %)(% style="color:#2980b9" %)M%
Helena K. 1.1 447
Helena K. 8.1 448 **Use Case 8: A [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] with multilingual support on [[Attributes>>doc:sdmx:Glossary 2\.1.Attribute.WebHome]]**
Helena K. 1.1 449
450 R1: Allow monthly and quarterly data
451
452 R2: Allow Mexico for vis-à-vis country
453
Helena K. 8.1 454 R3: Allow a [[comment>>doc:sdmx:Glossary 2\.1.Comment.WebHome]], in English, which includes the term adjusted for status
Helena K. 1.1 455
456 This may be expressed with the following CubeRegion:
457
Helena K. 2.1 458 (% style="width:382.294px" %)
459 |(% style="width:190px" %)(% style="color:#2980b9" %)FREQ|(% style="width:189px" %)(% style="color:#2980b9" %)M, Q
460 |(% style="width:190px" %)(% style="color:#2980b9" %)VIS_CTY|(% style="width:189px" %)(% style="color:#2980b9" %)MX
Helena K. 8.1 461 |(% style="width:190px" %)(% style="color:#27ae60" %)[[COMMENT>>doc:sdmx:Glossary 2\.1.Comment.WebHome]] (lang=’en’)|(% style="width:189px" %)(% style="color:#27ae60" %)%adjusted%
Helena K. 1.1 462
Helena K. 8.1 463 **Use Case 9: A [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]] on allowed values for [[Dimensions>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]] combined with allowed** values for Metadata [[Attributes>>doc:sdmx:Glossary 2\.1.Attribute.WebHome]] R1: Allow monthly and quarterly data
Helena K. 1.1 464
465 R2: Allow Mexico for vis-à-vis country
466
Helena K. 8.1 467 R3: Allow John Doe for [[contact>>doc:sdmx:Glossary 2\.1.Contact.WebHome]]
Helena K. 1.1 468
469 This may be expressed with the following CubeRegion:
470
Helena K. 2.1 471 (% style="width:388.294px" %)
472 |(% style="width:181px" %)(% style="color:#2980b9" %)FREQ|(% style="width:204px" %)(% style="color:#2980b9" %)M, Q
473 |(% style="width:181px" %)(% style="color:#2980b9" %)VIS_CTY|(% style="width:204px" %)(% style="color:#2980b9" %)MX
Helena K. 8.1 474 |(% style="width:181px" %)(% style="color:#f39c12" %)[[CONTACT>>doc:sdmx:Glossary 2\.1.Contact.WebHome]]|(% style="width:204px" %)(% style="color:#f39c12" %)John Doe
© Semantic R&D Group, 2026