Changes for page 10 Constraints
Last modified by Artur on 2025/09/10 11:19
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Attachments (0 modified, 5 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -57,7 +57,7 @@ 57 57 |(% 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 58 58 |(% 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 59 59 60 -== 10. 3Reporting Constraints ==60 +== 10.4 Reporting Constraints == 61 61 62 62 A Reporting Constraint is a Maintainable Artefact which restricts the values that can be reported in a dataset or metadata set based on one or more inclusion or exclusion rules. 63 63 ... ... @@ -66,7 +66,7 @@ 66 66 * Data Constraint 67 67 * Metadata Constraint 68 68 69 -== 10.4 Data Constraint == 69 +=== 10.4.1 Data Constraint === 70 70 71 71 A Data Constraint is used to add additional restrictions to the allowable values reported in a dataset. Data Constraints can be applied to the follow structures which are collectively known as Constrainable structures: 72 72 ... ... @@ -77,7 +77,7 @@ 77 77 78 78 **Note** regardless of the Constrainable structure, the restricted values relate to the allowable content for the Component of the DSD to which the constrained object relates. 79 79 80 -=== 10.4. 1Metadata Constraint ===80 +=== 10.4.2 Metadata Constraint === 81 81 82 82 A Metadata Constraint is used to add additional restrictions to the allowable values reported in a metadataset. Metadata Constraints can be applied to the follow structures which are collectively known as Constrainable structures: 83 83 ... ... @@ -88,7 +88,7 @@ 88 88 89 89 **Note** regardless of the Constrainable structure, the restricted values relate to the allowable content for the Component of the MSD to which the constrained object relates. 90 90 91 -=== 10.4. 2Scope of a Constraint ===91 +=== 10.4.3 Scope of a Constraint === 92 92 93 93 A Constraint is used specify the content of a data or metadata source in terms of the component values or the keys. 94 94 ... ... @@ -124,11 +124,11 @@ 124 124 125 125 In view of the flexibility of constraints attachment, clear rules on their usage are required. These are elaborated below. 126 126 127 -=== 10.4. 3Multiple Constraints ===127 +=== 10.4.4 Multiple Constraints === 128 128 129 129 There can be many Constraints for any Constrainable Artefact (e.g., DSD), subject to the following restrictions: 130 130 131 - **10.4.4.1 Cube Region**131 +==== 10.4.4.1 Cube Region ==== 132 132 133 133 A Constraint can contain multiple Member Selections (e.g., Dimensions). 134 134 ... ... @@ -158,17 +158,19 @@ 158 158 159 159 Data Constraint 1.0.0 160 160 161 -|Component|Valid Value|Valid from|Valid to 162 -|(% rowspan="3" %)COUNTRY|UK| | 163 -|FR| | 164 -|DE| | 161 +(% style="width:573.294px" %) 162 +|(% style="width:108px" %)Component|(% style="width:127px" %)Valid Value|(% style="width:150px" %)Valid from|(% style="width:185px" %)Valid to 163 +|(% rowspan="3" style="width:108px" %)COUNTRY|(% style="width:127px" %)UK|(% style="width:150px" %) |(% style="width:185px" %) 164 +|(% style="width:127px" %)FR|(% style="width:150px" %) |(% style="width:185px" %) 165 +|(% style="width:127px" %)DE|(% style="width:150px" %) |(% style="width:185px" %) 165 165 166 166 Data Constraint 1.1.0 167 167 168 -|Component|Valid Value|Valid from|Valid to 169 -|(% rowspan="3" %)COUNTRY|UK| | 170 -|FR| |2012 171 -|DE| | 169 +(% style="width:576.294px" %) 170 +|(% style="width:110px" %)Component|(% style="width:129px" %)Valid Value|(% style="width:145px" %)Valid from|(% style="width:189px" %)Valid to 171 +|(% rowspan="3" style="width:110px" %)COUNTRY|(% style="width:129px" %)UK|(% style="width:145px" %) |(% style="width:189px" %) 172 +|(% style="width:129px" %)FR|(% style="width:145px" %) |(% style="width:189px" %)2012 173 +|(% style="width:129px" %)DE|(% style="width:145px" %) |(% style="width:189px" %) 172 172 173 173 When both versions of the Data Constraint are in a system, an observation value reported against COUNTRY FR for time period 2013 would be deemed invalid as the 1.1.0 rule would be applied. 174 174 ... ... @@ -178,8 +178,9 @@ 178 178 179 179 There are three levels of constraint attachment for which these inheritance rules apply: 180 180 181 -* DSD/MSD – top level o Dataflow/Metadataflow – second level 182 -** Provision Agreement – third level 183 +* DSD/MSD – top level 184 +** Dataflow/Metadataflow – second level 185 +*** Provision Agreement – third level 183 183 184 184 It is not necessary for a Constraint to be attached to a higher level artefact. e.g., it is valid to have a Constraint for a Provision Agreement where there are no constraints attached the relevant Dataflow or DSD. 185 185 ... ... @@ -213,14 +213,14 @@ 213 213 214 214 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. 215 215 216 -1. 217 -11. Determine all possible keys that are valid at the higher level. 218 -11. These keys are deemed to be inherited by the lower-level constrained object, subject to the Constraints specified at the lower level. 219 -11. Determine all possible keys that are possible using the Constraints specified at the lower level. 220 -11. At the lower level inherit all keys that match with the higher-level Constraint. 221 -11. If there are keys in the lower-level Constraint that are not inherited then the key is invalid (i.e., it is less restrictive). 222 -111. Constraints Examples 219 +1. Determine all possible keys that are valid at the higher level. 220 +1. These keys are deemed to be inherited by the lower-level constrained object, subject to the Constraints specified at the lower level. 221 +1. Determine all possible keys that are possible using the Constraints specified at the lower level. 222 +1. At the lower level inherit all keys that match with the higher-level Constraint. 223 +1. If there are keys in the lower-level Constraint that are not inherited then the key is invalid (i.e., it is less restrictive). 223 223 225 +=== 10.4.7 Constraints Examples === 226 + 224 224 ==== 10.4.7.1 Data Constraint and Cascading ==== 225 225 226 226 The following scenario is used. ... ... @@ -234,9 +234,11 @@ 234 234 235 235 In the DSD, common code lists are used and the requirement is to restrict these at various levels to specify the actual code that are valid for the object to which the Constraint is attached. 236 236 240 +[[image:1750065279010-260.png]] 237 237 238 238 **Figure 20: Example Scenario for Constraints **Constraints are declared as follows: 239 239 244 +[[image:1750065319060-899.png]] 240 240 241 241 **Figure 21: Example Constraints** 242 242 ... ... @@ -277,10 +277,16 @@ 277 277 278 278 DSD Constraint 279 279 285 +[[image:1750065367824-357.png]] 286 + 280 280 Dataflow Constraints 281 281 289 +[[image:1750065392163-400.png]] 290 + 282 282 Provision Agreement Constraint 283 283 293 +[[image:1750065461589-995.png]] 294 + 284 284 **10.4.7.2 Combination of Constraints** 285 285 286 286 The possible combination of constraining terms are explained in this section, following a few examples. ... ... @@ -287,17 +287,18 @@ 287 287 288 288 Let’s assume a DSD with the following Components: 289 289 290 -|Dimension|FREQ 291 -|Dimension|JD_TYPE 292 -|Dimension|JD_CATEGORY 293 -|Dimension|VIS_CTY 294 -|TimeDimension|TIME_PERIOD 295 -|Attribute|OBS_STATUS 296 -|Attribute|UNIT 297 -|Attribute|COMMENT 298 -|MetadataAttribute|CONTACT 299 -|Measure|MULTISELECT 300 -|Measure|CHOICE 301 +(% style="width:459.294px" %) 302 +|(% style="width:204px" %)(% style="color:#3498db" %)Dimension|(% style="width:252px" %)(% style="color:#3498db" %)FREQ 303 +|(% style="width:204px" %)(% style="color:#3498db" %)Dimension|(% style="width:252px" %)(% style="color:#3498db" %)JD_TYPE 304 +|(% style="width:204px" %)(% style="color:#3498db" %)Dimension|(% style="width:252px" %)(% style="color:#3498db" %)JD_CATEGORY 305 +|(% style="width:204px" %)(% style="color:#3498db" %)Dimension|(% style="width:252px" %)(% style="color:#3498db" %)VIS_CTY 306 +|(% style="width:204px" %)(% style="color:#2980b9" %)TimeDimension|(% style="width:252px" %)(% style="color:#2980b9" %)TIME_PERIOD 307 +|(% style="width:204px" %)(% style="color:#16a085" %)Attribute|(% style="width:252px" %)(% style="color:#16a085" %)OBS_STATUS 308 +|(% style="width:204px" %)(% style="color:#16a085" %)Attribute|(% style="width:252px" %)(% style="color:#16a085" %)UNIT 309 +|(% style="width:204px" %)(% style="color:#16a085" %)Attribute|(% style="width:252px" %)(% style="color:#16a085" %)COMMENT 310 +|(% style="width:204px" %)(% style="color:#f39c12" %)MetadataAttribute|(% style="width:252px" %)(% style="color:#f39c12" %)CONTACT 311 +|(% style="width:204px" %)(% style="color:#e74c3c" %)Measure|(% style="width:252px" %)(% style="color:#e74c3c" %)MULTISELECT 312 +|(% style="width:204px" %)(% style="color:#e74c3c" %)Measure|(% style="width:252px" %)(% style="color:#e74c3c" %)CHOICE 301 301 302 302 On the above, let’s assume the following use cases with their constraining requirements: 303 303 ... ... @@ -309,8 +309,9 @@ 309 309 310 310 This is expressed with the following CubeRegion: 311 311 312 -|FREQ|M, Q 313 -|VIS_CTY|MX 324 +(% style="width:287.294px" %) 325 +|(% style="width:131px" %)(% style="color:#3498db" %)FREQ|(% style="width:153px" %)(% style="color:#3498db" %)M, Q 326 +|(% style="width:131px" %)(% style="color:#3498db" %)VIS_CTY|(% style="width:153px" %)(% style="color:#3498db" %)MX 314 314 315 315 **Use Case 2: A Constraint on allowed combinations for some Dimensions** 316 316 ... ... @@ -320,10 +320,11 @@ 320 320 321 321 This is expressed with the following DataKeySet: 322 322 323 -|Key1|FREQ|M 324 -| |VIS_CTY|DE 325 -|(% rowspan="2" %)Key2|FREQ|Q 326 -|VIS_CTY|MX 336 +(% style="width:388.294px" %) 337 +|(% style="width:105px" %)(% style="color:#2980b9" %)Key1|(% style="width:137px" %)(% style="color:#2980b9" %)FREQ|(% style="width:143px" %)(% style="color:#2980b9" %)M 338 +|(% style="width:105px" %) |(% style="width:137px" %)(% style="color:#2980b9" %)VIS_CTY|(% style="width:143px" %)(% style="color:#2980b9" %)DE 339 +|(% rowspan="2" style="width:105px" %)(% style="color:#2980b9" %)Key2|(% style="width:137px" %)(% style="color:#2980b9" %)FREQ|(% style="width:143px" %)(% style="color:#2980b9" %)Q 340 +|(% style="width:137px" %)(% style="color:#2980b9" %)VIS_CTY|(% style="width:143px" %)(% style="color:#2980b9" %)MX 327 327 328 328 **Use Case 3: A Constraint on allowed values for some Dimensions combined with allowed values for some Attributes** R1: Allow monthly and quarterly data 329 329 ... ... @@ -333,9 +333,10 @@ 333 333 334 334 This may be expressed with the following CubeRegion: 335 335 336 -|FREQ|M, Q 337 -|VIS_CTY|MX 338 -|OBS_STATUS|A 350 +(% style="width:285.294px" %) 351 +|(% style="width:143px" %)(% style="color:#2980b9" %)FREQ|(% style="width:139px" %)(% style="color:#2980b9" %)M, Q 352 +|(% style="width:143px" %)(% style="color:#2980b9" %)VIS_CTY|(% style="width:139px" %)(% style="color:#2980b9" %)MX 353 +|(% style="width:143px" %)(% style="color:#27ae60" %)OBS_STATUS|(% style="width:139px" %)(% style="color:#27ae60" %)A 339 339 340 340 **Use Case 4: A Constraint on allowed combinations for some Dimensions combined with specific Attribute values** 341 341 ... ... @@ -345,12 +345,13 @@ 345 345 346 346 This may be expressed with the following DataKeySet: 347 347 348 -|(% rowspan="3" %)Key1|FREQ|M 349 -|VIS_CTY|DE 350 -|UNIT|EUR 351 -|(% rowspan="3" %)Key2|FREQ|Q 352 -|VIS_CTY|MX 353 -|UNIT|USD 363 +(% style="width:389.294px" %) 364 +|(% rowspan="3" style="width:89px" %)(% style="color:#2980b9" %)Key1|(% style="width:153px" %)(% style="color:#2980b9" %)FREQ|(% style="width:142px" %)(% style="color:#2980b9" %)M 365 +|(% style="width:153px" %)(% style="color:#2980b9" %)VIS_CTY|(% style="width:142px" %)(% style="color:#2980b9" %)DE 366 +|(% style="width:153px" %)(% style="color:#27ae60" %)UNIT|(% style="width:142px" %)(% style="color:#27ae60" %)EUR 367 +|(% rowspan="3" style="width:89px" %)(% style="color:#2980b9" %)Key2|(% style="width:153px" %)(% style="color:#2980b9" %)FREQ|(% style="width:142px" %)(% style="color:#2980b9" %)Q 368 +|(% style="width:153px" %)(% style="color:#2980b9" %)VIS_CTY|(% style="width:142px" %)(% style="color:#2980b9" %)MX 369 +|(% style="width:153px" %)(% style="color:#27ae60" %)UNIT|(% style="width:142px" %)(% style="color:#27ae60" %)USD 354 354 355 355 **Use Case 5: A Constraint on allowed values for some Dimensions together with some combination of Dimension values** 356 356 ... ... @@ -360,12 +360,13 @@ 360 360 361 361 Considering the above examples, the following CubeRegions would be created: 362 362 363 -|(% rowspan="3" %)CubeRegion1|FREQ|Q, A 364 -|VIS_CTY|MX, DE 365 -|OBS_STATUS|A 366 -|(% rowspan="3" %)CubeRegion2|FREQ|M 367 -|VIS_CTY|MX, DE 368 -|OBS_STATUS|F 379 +(% style="width:449.294px" %) 380 +|(% rowspan="3" style="width:126px" %)(% style="color:#2980b9" %)CubeRegion1|(% style="width:137px" %)(% style="color:#2980b9" %)FREQ|(% style="width:183px" %)(% style="color:#2980b9" %)Q, A 381 +|(% style="width:137px" %)(% style="color:#2980b9" %)VIS_CTY|(% style="width:183px" %)(% style="color:#2980b9" %)MX, DE 382 +|(% style="width:137px" %)(% style="color:#27ae60" %)OBS_STATUS|(% style="width:183px" %)(% style="color:#27ae60" %)A 383 +|(% rowspan="3" style="width:126px" %)(% style="color:#2980b9" %)CubeRegion2|(% style="width:137px" %)(% style="color:#2980b9" %)FREQ|(% style="width:183px" %)(% style="color:#2980b9" %)M 384 +|(% style="width:137px" %)(% style="color:#2980b9" %)VIS_CTY|(% style="width:183px" %)(% style="color:#2980b9" %)MX, DE 385 +|(% style="width:137px" %)(% style="color:#27ae60" %)OBS_STATUS|(% style="width:183px" %)(% style="color:#27ae60" %)F 369 369 370 370 The problem with this approach is that according to the business rule for Constraints, only one should be specified per Component. 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). 371 371 ... ... @@ -373,21 +373,24 @@ 373 373 374 374 DSD CubeRegion: 375 375 376 -|FREQ|M, Q, A 377 -|VIS_CTY|MX, DE 378 -|OBS_STATUS|A, F 393 +(% style="width:280.294px" %) 394 +|(% style="width:156px" %)(% style="color:#2980b9" %)FREQ|(% style="width:121px" %)(% style="color:#2980b9" %)M, Q, A 395 +|(% style="width:156px" %)(% style="color:#2980b9" %)VIS_CTY|(% style="width:121px" %)(% style="color:#2980b9" %)MX, DE 396 +|(% style="width:156px" %)(% style="color:#27ae60" %)OBS_STATUS|(% style="width:121px" %)(% style="color:#27ae60" %)A, F 379 379 380 380 Dataflow1 CubeRegion: 381 381 382 -|FREQ|Q, A 383 -|VIS_CTY|MX, DE 384 -|OBS_STATUS|F 400 +(% style="width:285.294px" %) 401 +|(% style="width:157px" %)(% style="color:#2980b9" %)FREQ|(% style="width:125px" %)(% style="color:#2980b9" %)Q, A 402 +|(% style="width:157px" %)(% style="color:#2980b9" %)VIS_CTY|(% style="width:125px" %)(% style="color:#2980b9" %)MX, DE 403 +|(% style="width:157px" %)(% style="color:#27ae60" %)OBS_STATUS|(% style="width:125px" %)(% style="color:#27ae60" %)F 385 385 386 386 Dataflow2 CubeRegion: 387 387 388 -|FREQ|M 389 -|VIS_CTY|MX, DE 390 -|OBS_STATUS|A 407 +(% style="width:288.294px" %) 408 +|(% style="width:159px" %)(% style="color:#2980b9" %)FREQ|(% style="width:126px" %)(% style="color:#2980b9" %)M 409 +|(% style="width:159px" %)(% style="color:#2980b9" %)VIS_CTY|(% style="width:126px" %)(% style="color:#2980b9" %)MX, DE 410 +|(% style="width:159px" %)(% style="color:#27ae60" %)OBS_STATUS|(% style="width:126px" %)(% style="color:#27ae60" %)A 391 391 392 392 **Use case 6: A Constraint on allowed values for some Dimensions combined with allowed values for Measures** 393 393 ... ... @@ -395,14 +395,15 @@ 395 395 396 396 This may be expressed with the following DataKeySet: 397 397 398 -|(% rowspan="4" %)Key1|FREQ|M 399 -|VIS_CTY|DE 400 -|UNIT|EUR 401 -|CHOICE|A 402 -|(% rowspan="4" %)Key2|FREQ|Q 403 -|VIS_CTY|MX 404 -|UNIT|USD 405 -|CHOICE|B 418 +(% style="width:404.294px" %) 419 +|(% rowspan="4" style="width:99px" %)(% style="color:#2980b9" %)Key1|(% style="width:153px" %)(% style="color:#2980b9" %)FREQ|(% style="width:149px" %)(% style="color:#2980b9" %)M 420 +|(% style="width:153px" %)(% style="color:#2980b9" %)VIS_CTY|(% style="width:149px" %)(% style="color:#2980b9" %)DE 421 +|(% style="width:153px" %)(% style="color:#27ae60" %)UNIT|(% style="width:149px" %)(% style="color:#27ae60" %)EUR 422 +|(% style="width:153px" %)(% style="color:#e74c3c" %)CHOICE|(% style="width:149px" %)(% style="color:#e74c3c" %)A 423 +|(% rowspan="4" style="width:99px" %)(% style="color:#2980b9" %)Key2|(% style="width:153px" %)(% style="color:#2980b9" %)FREQ|(% style="width:149px" %)(% style="color:#2980b9" %)Q 424 +|(% style="width:153px" %)(% style="color:#2980b9" %)VIS_CTY|(% style="width:149px" %)(% style="color:#2980b9" %)MX 425 +|(% style="width:153px" %)(% style="color:#27ae60" %)UNIT|(% style="width:149px" %)(% style="color:#27ae60" %)USD 426 +|(% style="width:153px" %)(% style="color:#e74c3c" %)CHOICE|(% style="width:149px" %)(% style="color:#e74c3c" %)B 406 406 407 407 **Use Case 7: A Constraint with wildcards for Codes and removePrefix property** For this example, we assume that the VIS_CTY representation has been prefixed with prefix ‘AREA_’. In this Constraint, we need to remove the prefix. 408 408 ... ... @@ -414,8 +414,9 @@ 414 414 415 415 This may be expressed with the following CubeRegion: 416 416 417 -|FREQ|M, Q 418 -|VIS_CTY (removePrefix=’AREA_’)|M% 438 +(% style="width:379.294px" %) 439 +|(% style="width:264px" %)(% style="color:#2980b9" %)FREQ|(% style="width:112px" %)(% style="color:#2980b9" %)M, Q 440 +|(% style="width:264px" %)(% style="color:#2980b9" %)VIS_CTY (removePrefix=’AREA_’)|(% style="width:112px" %)(% style="color:#2980b9" %)M% 419 419 420 420 **Use Case 8: A Constraint with multilingual support on Attributes** 421 421 ... ... @@ -427,9 +427,10 @@ 427 427 428 428 This may be expressed with the following CubeRegion: 429 429 430 -|FREQ|M, Q 431 -|VIS_CTY|MX 432 -|COMMENT (lang=’en’)|%adjusted% 452 +(% style="width:382.294px" %) 453 +|(% style="width:190px" %)(% style="color:#2980b9" %)FREQ|(% style="width:189px" %)(% style="color:#2980b9" %)M, Q 454 +|(% style="width:190px" %)(% style="color:#2980b9" %)VIS_CTY|(% style="width:189px" %)(% style="color:#2980b9" %)MX 455 +|(% style="width:190px" %)(% style="color:#27ae60" %)COMMENT (lang=’en’)|(% style="width:189px" %)(% style="color:#27ae60" %)%adjusted% 433 433 434 434 **Use Case 9: A Constraint on allowed values for Dimensions combined with allowed** values for Metadata Attributes R1: Allow monthly and quarterly data 435 435 ... ... @@ -439,6 +439,7 @@ 439 439 440 440 This may be expressed with the following CubeRegion: 441 441 442 -|FREQ|M, Q 443 -|VIS_CTY|MX 444 -|CONTACT|John Doe 465 +(% style="width:388.294px" %) 466 +|(% style="width:181px" %)(% style="color:#2980b9" %)FREQ|(% style="width:204px" %)(% style="color:#2980b9" %)M, Q 467 +|(% style="width:181px" %)(% style="color:#2980b9" %)VIS_CTY|(% style="width:204px" %)(% style="color:#2980b9" %)MX 468 +|(% style="width:181px" %)(% style="color:#f39c12" %)CONTACT|(% style="width:204px" %)(% style="color:#f39c12" %)John Doe
- 1750065279010-260.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.helena - Size
-
... ... @@ -1,0 +1,1 @@ 1 +60.3 KB - Content
- 1750065319060-899.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.helena - Size
-
... ... @@ -1,0 +1,1 @@ 1 +91.0 KB - Content
- 1750065367824-357.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.helena - Size
-
... ... @@ -1,0 +1,1 @@ 1 +51.4 KB - Content
- 1750065392163-400.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.helena - Size
-
... ... @@ -1,0 +1,1 @@ 1 +104.8 KB - Content
- 1750065461589-995.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.helena - Size
-
... ... @@ -1,0 +1,1 @@ 1 +43.9 KB - Content