Changes for page 10 Constraints
Last modified by Helena on 2025/09/10 11:19
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Attachments (0 modified, 0 added, 19 removed)
- 1747386911707-332.png
- 1747386933952-158.png
- 1747386970127-658.png
- 1747386991329-805.png
- 1747387057775-838.png
- 1747387089210-741.png
- 1747387135817-339.png
- 1747387154981-708.png
- 1747387188821-467.png
- 1747387231598-634.png
- 1747387252077-954.png
- 1747387281625-859.png
- 1747387330751-405.png
- 1747387369822-932.png
- 1747387387944-676.png
- 1747387401689-306.png
- 1747387437317-733.png
- 1747387461703-763.png
- 1747387484366-337.png
Details
- Page properties
-
- Content
-
... ... @@ -146,7 +146,7 @@ 146 146 147 147 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. 148 148 149 -* 149 +* 150 150 *1. Determine all possible keys that are valid at the higher level. 151 151 *1. These keys are deemed to be inherited by the lower-level constrained object, subject to the Constraints specified at the lower level. 152 152 *1. Determine all possible keys that are possible using the Constraints specified at the lower level. ... ... @@ -155,7 +155,7 @@ 155 155 156 156 === 10.3.4 Constraints Examples === 157 157 158 -==== 10.3.4.1 Data Constraint and Cascading ==== 158 +==== 10.3.4.1 Data Constraint and Cascading ==== 159 159 160 160 The following scenario is used. 161 161 ... ... @@ -215,18 +215,128 @@ 215 215 216 216 DSD Constraint 217 217 218 - [[image:1747386911707-332.png]]218 +**<str:DataConstraint agencyID="SDMX" id="DATA_CONSTRAINT" version="1.0.0draft" type="Allowed">** 219 219 220 +**<com:Name xml:lang="en">SDMX 3.0 Data Constraint sample</com:Name>** 221 + 222 +**<str:ConstraintAttachment>** 223 + 224 +**<str:DataStructure>urn:sdmx:org.sdmx.infomodel.datastructure.** 225 + 226 +**DataStructure=CENSUSHUB:CENSUS(1.0.0)</str:DataStructure>** 227 + 228 +**</str:ConstraintAttachment>** 229 + 230 +**<str:CubeRegion include="true">** 231 + 232 +**<!~-~- the ability to exclude values is illustrated – i.e., all values valid except this one ~-~->** 233 + 234 +**<com:KeyValue id="AGE" include="false">** 235 + 236 +**<com:Value>001</com:Value>** 237 + 238 +**</com:KeyValue>** 239 + 240 +**</str:CubeRegion>** 241 + 242 +**</str:DataConstraint>** 243 + 220 220 Dataflow Constraints 221 221 222 - [[image:1747386933952-158.png]]246 +**<str:DataConstraint agencyID="SDMX" id="DATA_CONSTRAINT_2" version="1.0.0draft" type="Allowed">** 223 223 224 - [[image:1747386970127-658.png]]248 +**<com:Name xml:lang="en">SDMX 3.0 Data Constraint sample</com:Name>** 225 225 250 +**<str:ConstraintAttachment>** 251 + 252 +**<str:Dataflow>urn:sdmx:org.sdmx.infomodel.datastructure.Dataflow=** 253 + 254 +**CENSUSHUB:CENSUS_CUBE1(1.0.0)</str:Dataflow>** 255 + 256 +**</str:ConstraintAttachment>** 257 + 258 +**<str:CubeRegion include="true">** 259 + 260 +**<com:KeyValue id="AGE" include="true">** 261 + 262 +**<com:Value>002</com:Value>** 263 + 264 +**<com:Value>003</com:Value>** 265 + 266 +**</com:KeyValue>** 267 + 268 +**<com:KeyValue id="CAS">** 269 + 270 +**<com:Value>003</com:Value>** 271 + 272 +**<com:Value>004</com:Value>** 273 + 274 +**</com:KeyValue>** 275 + 276 +**</str:CubeRegion>** 277 + 278 +**</str:DataConstraint>** 279 + 280 +**<str:DataConstraint agencyID="SDMX" id="DATA_CONSTRAINT_3" version="1.0.0draft" type="Allowed">** 281 + 282 +**<com:Name xml:lang="en">SDMX 3.0 Data Constraint sample</com:Name>** 283 + 284 +**<str:ConstraintAttachment>** 285 + 286 +**<str:Dataflow>urn:sdmx:org.sdmx.infomodel.datastructure.Dataflow=** 287 + 288 +**CENSUSHUB:CENSUS_CUBE2(1.0.0)</str:Dataflow>** 289 + 290 +**</str:ConstraintAttachment>** 291 + 292 +**<str:CubeRegion include="true">** 293 + 294 +**<com:KeyValue id="CAS" include="true">** 295 + 296 +**<com:Value>TOT</com:Value>** 297 + 298 +**<com:Value>NAP</com:Value>** 299 + 300 +**</com:KeyValue>** 301 + 302 +**</str:CubeRegion>** 303 + 304 +**</str:DataConstraint>** 305 + 226 226 Provision Agreement Constraint 227 227 228 - [[image:1747386991329-805.png]]308 +**<str:DataConstraint agencyID="SDMX" id="DATA_CONSTRAINT_4" version="1.0.0draft" type="Allowed">** 229 229 310 +**<com:Name xml:lang="en">SDMX 3.0 Data Constraint sample</com:Name>** 311 + 312 +**<str:ConstraintAttachment>** 313 + 314 +**<str:ProvisionAgreement>urn:sdmx:org.sdmx.infomodel.registry.** 315 + 316 +**ProvisionAgreement=CENSUSHUB:CENSUS_CUBE1_IT(1.0.0)** 317 + 318 +**</str:ProvisionAgreement>** 319 + 320 +**<str:ProvisionAgreement>urn:sdmx:org.sdmx.infomodel.registry.** 321 + 322 +**ProvisionAgreement=CENSUSHUB:CENSUS_CUBE2_IT(1.0.0)** 323 + 324 +**</str:ProvisionAgreement>** 325 + 326 +**</str:ConstraintAttachment>** 327 + 328 +**<str:CubeRegion include="true">** 329 + 330 +**<com:KeyValue id="GEO" include="true">** 331 + 332 +**<com:Value cascadeValues="true">IT</com:Value>** 333 + 334 +**</com:KeyValue>** 335 + 336 +**</str:CubeRegion>** 337 + 338 +**</str:DataConstraint** 339 + 230 230 ==== 10.3.4.2 Combination of Constraints ==== 231 231 232 232 The possible combination of constraining terms are explained in this section, following a few examples. ... ... @@ -233,39 +233,57 @@ 233 233 234 234 Let’s assume a DSD with the following Components: 235 235 236 -[[image:1747387057775-838.png]] 346 +|Dimension|FREQ 347 +|Dimension|JD_TYPE 348 +|Dimension|JD_CATEGORY 349 +|Dimension|VIS_CTY 350 +|TimeDimension|TIME_PERIOD 351 +|Attribute|OBS_STATUS 352 +|Attribute|UNIT 353 +|Attribute|COMMENT 354 +|MetadataAttribute|CONTACT 355 +|Measure|MULTISELECT 356 +|Measure|CHOICE 237 237 238 -[[image:1747387089210-741.png]] 239 - 240 240 On the above, let’s assume the following use cases with their constraining requirements: 241 241 242 242 ===== 10.3.4.2.1 Use Case 1: A Constraint on allowed values for some Dimensions ===== 243 243 244 244 R1: Allow monthly and quarterly data 363 + 245 245 R2: Allow Mexico for vis-à-vis country 246 246 247 247 This is expressed with the following CubeRegion: 248 248 249 -[[image:1747387154981-708.png]] 368 +|FREQ|M, Q 369 +|VIS_CTY|MX 250 250 251 251 ===== 10.3.4.2.2 Use Case 2: A Constraint on allowed combinations for some Dimensions ===== 252 252 253 253 R1: Allow monthly data for Germany 374 + 254 254 R2: Allow quarterly data for Mexico 255 255 256 256 This is expressed with the following DataKeySet: 257 257 258 -[[image:1747387188821-467.png]] 379 +|(% rowspan="2" %)Key1|FREQ|M 380 +|VIS_CTY|DE 381 +|(% rowspan="2" %)Key2|FREQ|Q 382 +|VIS_CTY|MX 259 259 260 -===== 0.3.4.2.3 Use Case 3: A Constraint on allowed values for some Dimensions combined with allowed values for some Attributes ===== 384 +===== 10.3.4.2.3 Use Case 3: A Constraint on allowed values for some Dimensions combined with allowed values for some Attributes ===== 261 261 262 262 R1: Allow monthly and quarterly data 387 + 263 263 R2: Allow Mexico for vis-à-vis country 389 + 264 264 R3: Allow present for status 265 265 266 266 This may be expressed with the following CubeRegion: 267 267 268 -[[image:1747387231598-634.png]] 394 +|FREQ|M, Q 395 +|VIS_CTY|MX 396 +|OBS_STATUS|A 269 269 270 270 ===== 10.3.4.2.4 Use Case 4: A Constraint on allowed combinations for some ===== 271 271 ... ... @@ -272,22 +272,32 @@ 272 272 //**Dimensions combined with specific Attribute values**// 273 273 274 274 R1: Allow monthly data, for Germany, with unit euro 403 + 275 275 R2: Allow quarterly data, for Mexico, with unit usd 276 276 277 277 This is may be expressed with the following DataKeySet: 278 278 279 -[[image:1747387252077-954.png]] 408 +|(% rowspan="3" style="width:87px" %)Key1|(% style="width:1327px" %)FREQ|M 409 +|(% style="width:1327px" %)VIS_CTY|DE 410 +|(% style="width:1327px" %)UNIT|EUR 411 +|(% rowspan="3" style="width:87px" %)Key2|(% style="width:1327px" %)FREQ|Q 412 +|(% style="width:1327px" %)VIS_CTY|MX 413 +|(% style="width:1327px" %)UNIT|USD 280 280 281 -[[image:1747387281625-859.png]] 282 - 283 283 ===== 10.3.4.2.5 Use Case 5: A Constraint on allowed values for some Dimensions together with some combination of Dimension values ===== 284 284 285 285 R1: For annually and quarterly data, for Mexico and Germany, only A status is allowed 418 + 286 286 R2: For monthly data, for Mexico and Germany, only F status is allowed 287 287 288 288 Considering the above examples, the following CubeRegions would be created: 289 289 290 -[[image:1747387330751-405.png]] 423 +|(% rowspan="3" %)CubeRegion1|FREQ|Q, A 424 +|VIS_CTY|MX, DE 425 +|OBS_STATUS|A 426 +|(% rowspan="3" %)CubeRegion2|FREQ|M 427 +|VIS_CTY|MX, DE 428 +|OBS_STATUS|F 291 291 292 292 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). 293 293 ... ... @@ -295,22 +295,36 @@ 295 295 296 296 DSD CubeRegion: 297 297 298 -[[image:1747387369822-932.png]] 436 +|FREQ|M, Q, A 437 +|VIS_CTY|MX, DE 438 +|OBS_STATUS|A, F 299 299 300 300 Dataflow1 CubeRegion: 301 301 302 -[[image:1747387387944-676.png]] 442 +|FREQ|Q, A 443 +|VIS_CTY|MX, DE 444 +|OBS_STATUS|F 303 303 304 304 Dataflow2 CubeRegion: 305 305 306 -[[image:1747387401689-306.png]] 448 +|FREQ|M 449 +|VIS_CTY|MX, DE 450 +|OBS_STATUS|A 307 307 308 308 ===== 10.3.4.2.6 Use case 6: A Constraint on allowed values for some Dimensions combined with allowed values for Measures ===== 309 309 310 310 R1: Allow monthly data, for Germany, with unit euro, and measure choice is 'A' 455 + 311 311 R2: Allow quarterly data, for Mexico, with unit usd, and measure choice is 'B' This is may be expressed with the following DataKeySet: 312 312 313 -[[image:1747387437317-733.png]] 458 +|(% rowspan="4" %)Key1|FREQ|M 459 +|VIS_CTY|DE 460 +|UNIT|EUR 461 +|CHOICE|A 462 +|(% rowspan="4" %)Key2|FREQ|Q 463 +|VIS_CTY|MX 464 +|UNIT|USD 465 +|CHOICE|B 314 314 315 315 ===== 10.3.4.2.7 Use Case 7: A Constraint with wildcards for Codes and removePrefix property ===== 316 316 ... ... @@ -317,22 +317,29 @@ 317 317 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. 318 318 319 319 R1: Allow monthly and quarterly data 472 + 320 320 R2: Allow vis-à-vis countries that start with M 474 + 321 321 R3: Remove the prefix ‘AREA_’ 322 322 323 -[[image:1747387461703-763.png]] 324 - 325 325 This may be expressed with the following CubeRegion: 326 326 479 +|FREQ|M, Q 480 +|VIS_CTY (removePrefix=’AREA_’)|M% 481 + 327 327 ===== 10.3.4.2.8 Use Case 8: A Constraint with multilingual support on Attributes ===== 328 328 329 329 R1: Allow monthly and quarterly data 485 + 330 330 R2: Allow Mexico for vis-à-vis country 487 + 331 331 R3: Allow a comment, in English, which includes the term adjusted for status 332 332 333 333 This may be expressed with the following CubeRegion: 334 334 335 -[[image:1747387484366-337.png]] 492 +|FREQ|M, Q 493 +|VIS_CTY|MX 494 +|COMMENT (lang=’en’)|%adjusted% 336 336 337 337 ===== 10.3.4.2.9 Use Case 9: A Constraint on allowed values for Dimensions combined with allowed values for Metadata Attributes ===== 338 338
- 1747386911707-332.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.helena - Size
-
... ... @@ -1,1 +1,0 @@ 1 -47.1 KB - Content
- 1747386933952-158.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.helena - Size
-
... ... @@ -1,1 +1,0 @@ 1 -35.3 KB - Content
- 1747386970127-658.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.helena - Size
-
... ... @@ -1,1 +1,0 @@ 1 -59.4 KB - Content
- 1747386991329-805.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.helena - Size
-
... ... @@ -1,1 +1,0 @@ 1 -56.5 KB - Content
- 1747387057775-838.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.helena - Size
-
... ... @@ -1,1 +1,0 @@ 1 -13.1 KB - Content
- 1747387089210-741.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.helena - Size
-
... ... @@ -1,1 +1,0 @@ 1 -8.3 KB - Content
- 1747387135817-339.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.helena - Size
-
... ... @@ -1,1 +1,0 @@ 1 -3.8 KB - Content
- 1747387154981-708.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.helena - Size
-
... ... @@ -1,1 +1,0 @@ 1 -3.8 KB - Content
- 1747387188821-467.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.helena - Size
-
... ... @@ -1,1 +1,0 @@ 1 -8.2 KB - Content
- 1747387231598-634.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.helena - Size
-
... ... @@ -1,1 +1,0 @@ 1 -6.2 KB - Content
- 1747387252077-954.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.helena - Size
-
... ... @@ -1,1 +1,0 @@ 1 -5.1 KB - Content
- 1747387281625-859.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.helena - Size
-
... ... @@ -1,1 +1,0 @@ 1 -6.0 KB - Content
- 1747387330751-405.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.helena - Size
-
... ... @@ -1,1 +1,0 @@ 1 -15.8 KB - Content
- 1747387369822-932.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.helena - Size
-
... ... @@ -1,1 +1,0 @@ 1 -6.9 KB - Content
- 1747387387944-676.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.helena - Size
-
... ... @@ -1,1 +1,0 @@ 1 -6.2 KB - Content
- 1747387401689-306.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.helena - Size
-
... ... @@ -1,1 +1,0 @@ 1 -6.0 KB - Content
- 1747387437317-733.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.helena - Size
-
... ... @@ -1,1 +1,0 @@ 1 -13.9 KB - Content
- 1747387461703-763.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.helena - Size
-
... ... @@ -1,1 +1,0 @@ 1 -6.5 KB - Content
- 1747387484366-337.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.helena - Size
-
... ... @@ -1,1 +1,0 @@ 1 -9.0 KB - Content