Changes for page 16 Annex 6: Worked Use Case
Last modified by Helena on 2025/09/10 11:19
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -xwiki:XWiki.he lena1 +xwiki:XWiki.arturkryazhev - Content
-
... ... @@ -4,35 +4,37 @@ 4 4 5 5 == 16.1 Scope == 6 6 7 -The scope of this Chapter is to show the [[SDMX-ML>>doc:sdmx:Glossary.SDMX-ML.WebHome]]interactions with the Registry, database, and[[metadata repository>>doc:sdmx:Glossary.Metadatarepository.WebHome]]for the use case scenario outlined in Chapter 3. The scenario is repeated below.7 +The scope of this Chapter is to show the SDMX-ML interactions with the Registry, database, and metadata repository for the use case scenario outlined in Chapter 3. The scenario is repeated below. 8 8 9 -The [[SDMX-ML>>doc:sdmx:Glossary.SDMX-ML.WebHome]]examples used are(% style="color:#e74c3c" %)version(%%)2.1.9 +The SDMX-ML examples used are version 2.1. 10 10 11 11 == 16.2 Scenario == 12 12 13 -This scenario is the dissemination of data and related [[reference metadata>>doc:sdmx:Glossary.Referencemetadata.WebHome]]using[[SDMX>>doc:sdmx:Glossary.Statisticaldata and metadata exchange.WebHome]]web services. It shows how the data,[[reference metadata>>doc:sdmx:Glossary.Reference metadata.WebHome]], and[[structural metadata>>doc:sdmx:Glossary.Structuralmetadata.WebHome]] are used to build a web dissemination system.13 +This scenario is the dissemination of data and related reference metadata using SDMX web services. It shows how the data, reference metadata, and structural metadata are used to build a web dissemination system. 14 14 15 +(% style="text-align: center;" %) 15 15 [[image:image-20250318221512-1.jpeg||data-xwiki-image-style-alignment="center"]] 16 16 17 17 (% style="text-align: center;" %) 18 -**{{id name="image_47"/}}Figure 47: Process flow of an [[SDMX>>doc:sdmx:Glossary.Statisticaldata and metadata exchange.WebHome]]WebData Dissemination System**19 +**{{id name="image_47"/}}Figure 47: Process flow of an SDMX Web Data Dissemination System** 19 19 20 20 (% style="width:753.446px" %) 21 21 |**Process**|(% style="width:670px" %)**Description** 22 -|1|(% style="width:670px" %)Retrieve the [[DSD>>doc:sdmx:Glossary.Datastructure definition.WebHome]] from a[[structural metadata>>doc:sdmx:Glossary.Structuralmetadata.WebHome]]source (e.g. an[[SDMX Registry>>doc:sdmx:Glossary.SDMX Registry.WebHome]]), and create database tables.23 -|2|(% style="width:670px" %)Read an [[SDMX>>doc:sdmx:Glossary.Statisticaldataand metadata exchange.WebHome]] [[dataset>>doc:sdmx:Glossary.Dataset.WebHome]]file and load the data into the database24 -|3|(% style="width:670px" %)Data discovery system continually synchronises its metadata with the [[structural metadata>>doc:sdmx:Glossary.Structuralmetadata.WebHome]]source. A user makes a data selection from choices built from the information held in an[[SDMX Registry>>doc:sdmx:Glossary.SDMXRegistry.WebHome]]([[structural metadata>>doc:sdmx:Glossary.Structuralmetadata.WebHome]]such as[[category scheme>>doc:sdmx:Glossary.Category scheme.WebHome]],[[dataflow>>doc:sdmx:Glossary.Dataflow.WebHome]],[[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]],[[data provider>>doc:sdmx:Glossary.Data provider.WebHome]],[[provision agreements>>doc:sdmx:Glossary.Provisionagreement.WebHome]] and data registration)25 -|3|(% style="width:670px" %)These choices are logical choices, built from the [[dimension>>doc:sdmx:Glossary.Dimension.WebHome]]selections.26 -|5|(% style="width:670px" %)The logical choice is formatted as an [[SDMX>>doc:sdmx:Glossary.Statisticaldataand metadata exchange.WebHome]] dataquery. This is passed to the Data Base which responds with an[[SDMX>>doc:sdmx:Glossary.Statisticaldataand metadata exchange.WebHome]] [[dataset>>doc:sdmx:Glossary.Data set.WebHome]].27 -|6|(% style="width:670px" %) [[Reference metadata>>doc:sdmx:Glossary.Referencemetadata.WebHome]]relevant to the data returned is retrieved from a[[metadata repository>>doc:sdmx:Glossary.Metadata repository.WebHome]].28 -|7|(% style="width:670px" %)The data and metadata are passed to a visualization tool to display the data in tables, charts, graphs, (% style="color:#e74c3c" %)maps(%%)etc. Often a download is offered in various formats. The download options often include also the[[DSD>>doc:sdmx:Glossary.Datastructure definition.WebHome]] or MSD.23 +|1|(% style="width:670px" %)Retrieve the DSD from a structural metadata source (e.g. an SDMX Registry), and create database tables. 24 +|2|(% style="width:670px" %)Read an SDMX data set file and load the data into the database 25 +|3|(% style="width:670px" %)Data discovery system continually synchronises its metadata with the structural metadata source. A user makes a data selection from choices built from the information held in an SDMX Registry (structural metadata such as category scheme, dataflow, DSD, data provider, provision agreements and data registration) 26 +|3|(% style="width:670px" %)These choices are logical choices, built from the dimension selections. 27 +|5|(% style="width:670px" %)The logical choice is formatted as an SDMX data query. This is passed to the Data Base which responds with an SDMX data set. 28 +|6|(% style="width:670px" %)Reference metadata relevant to the data returned is retrieved from a metadata repository. 29 +|7|(% style="width:670px" %)The data and metadata are passed to a visualization tool to display the data in tables, charts, graphs, maps etc. Often a download is offered in various formats. The download options often include also the DSD or MSD. 29 29 30 30 == 16.3 Structural Metadata == 31 31 32 32 === 16.3.1 Schematic === 33 33 34 -The following [[structural metadata>>doc:sdmx:Glossary.Structuralmetadata.WebHome]] and provisioning metadata is used in the scenario.35 +The following structural metadata and provisioning metadata is used in the scenario. 35 35 37 +(% style="text-align: center;" %) 36 36 [[image:image-20250318221512-2.jpeg||data-xwiki-image-style-alignment="center"]] 37 37 38 38 (% style="text-align: center;" %) ... ... @@ -40,28 +40,24 @@ 40 40 41 41 === 16.3.2 Data Structure Definition === 42 42 43 -For the reasons of clarity a sub set of the contents of the [[Code Lists>>doc:sdmx:Glossary.Codelist.WebHome]]and[[Concept Schemes>>doc:sdmx:Glossary.Conceptscheme.WebHome]]are used in this example, and only a few of the[[DSD>>doc:sdmx:Glossary.Datastructure definition.WebHome]] [[Attributes>>doc:sdmx:Glossary.Attribute.WebHome]]are used.45 +For the reasons of clarity a sub set of the contents of the Code Lists and Concept Schemes are used in this example, and only a few of the DSD Attributes are used. 44 44 45 -(% class="wikigeneratedid" id="HDimensions" %) 46 -**Dimensions** 47 +===== **Dimensions** ===== 47 47 48 48 (% style="text-align: center;" %) 49 49 [[image:image-20250318221512-3.jpeg]]** ** 50 50 51 -(% class="wikigeneratedid" id="HAttributes" %) 52 -**Attributes** 52 +===== **Attributes** ===== 53 53 54 54 (% style="text-align: center;" %) 55 55 [[image:image-20250318221512-4.jpeg]]** ** 56 56 57 -(% class="wikigeneratedid" id="HGroup" %) 58 -**Group** 57 +===== **Group** ===== 59 59 60 60 (% style="text-align: center;" %) 61 61 [[image:image-20250318221512-5.jpeg]]** ** 62 62 63 -(% class="wikigeneratedid" id="HPrimaryMeasure" %) 64 -**Primary Measure** 62 +===== **Primary Measure** ===== 65 65 66 66 (% style="text-align: center;" %) 67 67 [[image:image-20250318221512-6.jpeg]]** ** ... ... @@ -70,29 +70,28 @@ 70 70 71 71 === 16.4.1 Create Data Base === 72 72 71 +(% style="text-align: center;" %) 73 73 [[image:image-20250318221512-7.jpeg||data-xwiki-image-style-alignment="center"]] 74 74 75 75 (% style="text-align: center;" %) 76 76 **{{id name="image_49"/}}Figure 49: User Case - Create Database Tables from DSD** 77 77 78 -The following [[SDMX-ML>>doc:sdmx:Glossary.SDMX-ML.WebHome]]is extracted from the Registry using the REST query http:~/~/[ ws-entry-point]/DataStructure_ECB/ECB_EXR177 +The following SDMX-ML is extracted from the Registry using the REST query http:~/~/[ ws-entry-point]/DataStructure_ECB/ECB_EXR1 79 79 80 -(% class="wikigeneratedid" id="HDimensions" %) 81 -**Dimensions** 79 +===== Dimensions ===== 82 82 81 +(% style="text-align: center;" %) 83 83 [[image:image-20250318221512-8.jpeg||data-xwiki-image-style-alignment="center"]] 84 84 85 85 Note that for brevity only the XML of the FREQ and TIME_PERIOD are shown in full. 86 86 87 -(% class="wikigeneratedid" id="HNotes" %) 88 -**Notes** 86 +===== **Notes** ===== 89 89 90 90 1. A Dimension can state its position in the key, but the actual sequence is defined by the sequence in the <DimensionList> i.e. the inferred sequence in the <DimensionList> takes precedence over the value of the position attribute. 91 91 1. This DSD is converted from version 2.0. The version 2.0 Concepts were standalone in the form <Concept agencyID=”ECB” version=”1.0”/> 92 92 1. The standalone concept is not supported in 2.1 and any standalone concept is placed in a Concept Scheme with the Id “STANDALONE_CONCEPT_SCHEME” of the version corresponding to the version of the original standalone concept. 93 93 94 -(% class="wikigeneratedid" id="HGroup-1" %) 95 -**Group** 92 +===== **Group** ===== 96 96 97 97 (% style="text-align: center;" %) 98 98 [[image:image-20250318221512-9.jpeg]]** ** ... ... @@ -102,17 +102,17 @@ 102 102 1. A Group in version 2.1 plays the same role as it does in version 2.0 except that it does not group Series in the data set. The Group in version 2.1 is used solely as a mechanism to attach Attributes in the data set. 103 103 1. The Group in version 2.1 is retained for compatibility with version 2.0 and for avoiding repetition in the new Attribute Relationship construct which is introduced in version 2.1. 104 104 105 -(% class="wikigeneratedid" id="HAttributes" %) 106 -**Attributes** 102 +===== Attributes ===== 107 107 104 +(% style="text-align: center;" %) 108 108 [[image:image-20250318221512-10.jpeg||data-xwiki-image-style-alignment="center"]] 109 109 107 +(% style="text-align: center;" %) 110 110 [[image:image-20250318221512-11.jpeg||data-xwiki-image-style-alignment="center"]] 111 111 112 112 Note that for brevity only the XML of the DECIMALS (relationship to a group) COLLECTION (relationship to a set of Dimensions) and OBS_CONF (relationship to the Primary Measure) are shown in full. 113 113 114 -(% class="wikigeneratedid" id="HNotes-1" %) 115 -**Notes** 112 +===== **Notes** ===== 116 116 117 117 1. The Attribute has a relationship to either a data set of one or more Dimensions as described in Chapter 4. 118 118 1. DECIMALS has a relationship to a Group with the Id of Group. ... ... @@ -119,23 +119,22 @@ 119 119 1. COLLECTION has a relationship to a set of Dimensions – in this case this is, in reality, the series key as this has been converted from version 2.0. It is possible for an attribute to have a relationship with just one, a few, or all of the Dimensions. 120 120 1. OBS_CONF has a relationship with the Primary Measure. 121 121 122 -(% class="wikigeneratedid" id="HMeasure" %) 123 -**Measure** 119 +===== **Measure** ===== 124 124 121 +(% style="text-align: center;" %) 125 125 [[image:image-20250318221512-12.jpeg||data-xwiki-image-style-alignment="center"]] 126 126 127 127 A typical database schema that can be set up using this DSD is shown below. 128 128 129 -(% class="wikigeneratedid" id="HSeriesKeyTable" %) 130 -**Series Key Table** 126 +===== **Series Key Table** ===== 131 131 128 +(% style="text-align: center;" %) 132 132 [[image:image-20250318221902-34.png||data-xwiki-image-style-alignment="center"]] 133 133 134 134 (% style="text-align: center;" %) 135 135 **{{id name="image_50"/}}Figure 50: Relational Table Structure created from a DSD Dimensions and Related Attributes** 136 136 137 -(% class="wikigeneratedid" id="HGroup201CGroup201DTable" %) 138 -**Group “Group” Table** 134 +===== **Group “Group” Table** ===== 139 139 140 140 (% style="text-align: center;" %) 141 141 [[image:image-20250318221512-13.jpeg]]** ** ... ... @@ -143,9 +143,9 @@ 143 143 (% style="text-align: center;" %) 144 144 **{{id name="image_51"/}}Figure 51: Relational Table Structure created from a DSD Group and Related Attributes** 145 145 146 -(% class="wikigeneratedid" id="HObservation" %) 147 -**Observation** 142 +===== **Observation** ===== 148 148 144 +(% style="text-align: center;" %) 149 149 [[image:image-20250318221512-14.jpeg||data-xwiki-image-style-alignment="center"]] 150 150 151 151 (% style="text-align: center;" %) ... ... @@ -153,6 +153,7 @@ 153 153 154 154 === 16.4.2 Load Database === 155 155 152 +(% style="text-align: center;" %) 156 156 [[image:image-20250318221512-15.jpeg||data-xwiki-image-style-alignment="center"]] 157 157 158 158 (% style="text-align: center;" %) ... ... @@ -160,14 +160,15 @@ 160 160 161 161 The following is an extract from the SDMX dataset. 162 162 160 +(% style="text-align: center;" %) 163 163 [[image:image-20250319123255-1.png||data-xwiki-image-style-alignment="center"]] 164 164 163 +(% style="text-align: center;" %) 165 165 [[image:image-20250319123339-2.png||data-xwiki-image-style-alignment="center"]] 166 166 167 167 Note that this is a sub set of the actual data message. 168 168 169 -(% class="wikigeneratedid" id="HNotes-2" %) 170 -**Notes** 168 +===== **Notes** ===== 171 171 172 172 1. The reference to the DSD is given in the message header and given a local structureId 173 173 1. The local structureId (DSD) is referenced from the DataSet ... ... @@ -177,18 +177,17 @@ 177 177 178 178 The diagrams below show the database content based on the schema created. 179 179 180 -(% class="wikigeneratedid" id="HSeriesKeyTable-1" %) 181 -**Series Key Table** 178 +===== **Series Key Table** ===== 182 182 180 +(% style="text-align: center;" %) 183 183 [[image:image-20250318221512-16.jpeg||data-xwiki-image-style-alignment="center"]] 184 184 185 -(% class="wikigeneratedid" id="HGroupTable" %) 186 -**Group Table** 183 +===== **Group Table** ===== 187 187 185 +(% style="text-align: center;" %) 188 188 [[image:image-20250318221512-17.jpeg||data-xwiki-image-style-alignment="center"]] 189 189 190 -(% class="wikigeneratedid" id="HObservationTable" %) 191 -**Observation Table** 188 +===== **Observation Table** ===== 192 192 193 193 (% style="text-align: center;" %) 194 194 [[image:image-20250318221512-18.jpeg]]** ** ... ... @@ -199,6 +199,7 @@ 199 199 200 200 The following registration is submitted to the Registry. 201 201 199 +(% style="text-align: center;" %) 202 202 [[image:image-20250318221512-19.jpeg||data-xwiki-image-style-alignment="center"]] 203 203 204 204 The SDMX web service of the database can now be searched for in the Registry. ... ... @@ -205,6 +205,7 @@ 205 205 206 206 === 16.4.4 Retrieve and Visualise Category Scheme and Dataflows === 207 207 206 +(% style="text-align: center;" %) 208 208 [[image:image-20250318221512-20.jpeg||data-xwiki-image-style-alignment="center"]] 209 209 210 210 (% style="text-align: center;" %) ... ... @@ -214,8 +214,10 @@ 214 214 215 215 [[http:~~/~~/ ~[ws-entry-point~]/categoryscheme/ECB/SDW_ECONOMIC_CONCEPTS/1.0?references=parents>>http:// [ws-entry-point]/categoryscheme/ECB/SDW_ECONOMIC_CONCEPTS/1.0?references=parents||rel="noopener noreferrer" target="_blank"]] 216 216 216 +(% style="text-align: center;" %) 217 217 [[image:image-20250318221512-21.jpeg||data-xwiki-image-style-alignment="center"]] 218 218 219 +(% style="text-align: center;" %) 219 219 [[image:image-20250318221512-22.jpeg||data-xwiki-image-style-alignment="center"]] 220 220 221 221 The application will now retrieve the Dataflows in the list of Categorisations – in this case there is only one – effective exchange rates. ... ... @@ -224,6 +224,7 @@ 224 224 225 225 [[http:~~/~~/ ~[ws-entry-point~]/dataflow/ECB/2034482/1.0>>http:// [ws-entry-point]/dataflow/ECB/2034482/1.0||rel="noopener noreferrer" target="_blank"]] 226 226 228 +(% style="text-align: center;" %) 227 227 [[image:image-20250318221512-23.jpeg||data-xwiki-image-style-alignment="center"]] 228 228 229 229 The actual choreography of the query application is dependent upon the implementation but the following is assumed for this example. ... ... @@ -236,10 +236,10 @@ 236 236 237 237 [[http:~~/~~/~[ws-entry-point~]/dataflow/ECB/2034482/1.0?references=provisionagreement>>http://[ws-entry-point]/dataflow/ECB/2034482/1.0?references=provisionagreement||rel="noopener noreferrer" target="_blank"]] 238 238 241 +(% style="text-align: center;" %) 239 239 [[image:image-20250318221512-24.jpeg||data-xwiki-image-style-alignment="center"]] 240 240 241 -(% class="wikigeneratedid" id="HNotes-3" %) 242 -**Notes** 244 +===== **Notes** ===== 243 243 244 244 ~1. The <URN> contains the same identification information as the individual attributes in the <Ref> tag in the context of the <Dataflow> and <Structure> tags (the <Dataflow> identifies that the <Structure> is a DataStructure). 245 245 ... ... @@ -247,21 +247,23 @@ 247 247 248 248 [[http:~~/~~/~[ws-entry-point~]/dataprovider/ECB>>http://[ws-entry-point]/dataprovider/ECB||rel="noopener noreferrer" target="_blank"]] 249 249 250 -(% class="wikigeneratedid" id="HNotes-4" %) 251 -**Notes** 252 +===== **Notes** ===== 252 252 253 253 ~1. As an Agency can have only one Data Provider Scheme and this has a mandatory Id of DATA_PROVIDER_SCHEME and must be version 1.0 there is no need to specify any other parameters to the REST query. 254 254 255 255 This returns the following as part of the Data Provider Scheme. 256 256 258 +(% style="text-align: center;" %) 257 257 [[image:image-20250318221512-25.jpeg||data-xwiki-image-style-alignment="center"]] 258 258 259 259 The following Registry query will return the REST data source referenced in a Registration for the Provision Agreement 260 260 263 +(% style="text-align: center;" %) 261 261 [[image:image-20250318221512-26.jpeg||data-xwiki-image-style-alignment="center"]] 262 262 263 263 The response from this query is: 264 264 268 +(% style="text-align: center;" %) 265 265 [[image:image-20250318221512-27.jpeg||data-xwiki-image-style-alignment="center"]] 266 266 267 267 The query application now has the details of the web service to call when making a query, and it also knows that the query expected uses the REST interface. ... ... @@ -272,6 +272,7 @@ 272 272 273 273 The application can now visualize the information it has retrieved from the Registry in a way that is meaningful to the user. An example visualization is shown below. 274 274 279 +(% style="text-align: center;" %) 275 275 [[image:image-20250318221512-28.jpeg||data-xwiki-image-style-alignment="center"]] 276 276 277 277 (% style="text-align: center;" %) ... ... @@ -281,10 +281,12 @@ 281 281 282 282 === 16.4.5 Build Dimension Selection and Logical Query === 283 283 289 +(% style="text-align: center;" %) 284 284 [[image:image-20250318221512-29.jpeg||data-xwiki-image-style-alignment="center"]] 285 285 286 286 Clicking on the Dataflow will cause the query application to query the Registry for the DSD associated to the Dataflow. The Dimensions and the relevant codes associated with the Dimensions are then shown for detailed data selections. 287 287 294 +(% style="text-align: center;" %) 288 288 [[image:image-20250318221512-30.jpeg||data-xwiki-image-style-alignment="center"]] 289 289 290 290 (% style="text-align: center;" %) ... ... @@ -294,12 +294,12 @@ 294 294 295 295 === 16.4.6 Query Database === 296 296 304 +(% style="text-align: center;" %) 297 297 [[image:image-20250318221512-31.jpeg||data-xwiki-image-style-alignment="center"]] 298 298 299 299 The logical query of the user is converted to an SDMX query and sent to the Data Web Service of the data publisher. The Data Web Service may also query the Metadata Repository in order to return both data and related metadata to the user application. The Data Web Service may also require structural metadata (DSD and MSD and related Code Lists and Concepts) from the structural metadata repository, in this example this an SDMX Registry. 300 300 301 -(% class="wikigeneratedid" id="HDataQueryLogicalSelections" %) 302 -**Data Query Logical Selections** 309 +===== **Data Query Logical Selections** ===== 303 303 304 304 (% style="width:551.446px" %) 305 305 |(% style="width:261px" %)**Dimension**|(% style="width:286px" %)**Values** ... ... @@ -310,17 +310,18 @@ 310 310 |(% style="width:261px" %)EXR_SUFFIX|(% style="width:286px" %)A 311 311 |(% style="width:261px" %)Time|(% style="width:286px" %)Jan 2008-Dec 2010 312 312 313 -(% class="wikigeneratedid" id="HRESTQuery" %) 314 -**REST Query** 320 +===== **REST Query** ===== 315 315 316 316 [[http:~~/~~/ws-entry-point/data/2034482/M.Z26+Z28.EUR+CZK+DKK.DFC0+EN00+A /ECB?startPeriod=2008-01&endPeriod=2010-12&detail=dataonly>>http://ws-entry-point/data/2034482/M.Z26+Z28.EUR+CZK+DKK.DFC0+EN00+A /ECB?startPeriod=2008-01&endPeriod=2010-12&detail=dataonly||rel="noopener noreferrer" target="_blank"]] 317 317 318 318 === 16.4.7 Visualise the Resultant Data Set === 319 319 326 +(% style="text-align: center;" %) 320 320 [[image:image-20250318221512-32.jpeg||data-xwiki-image-style-alignment="center" height="310" width="346"]] 321 321 322 322 The returned data and metadata can be presented to the user in many ways – tables, graphs, charts, maps etc. SDMX does not support visualization directly but it is possible to define roles for a Dimension and Attribute in the DSD. For instance, it is possible to assign a role of “Geography” or “Title” or “Measure Unit” etc. which will aid a data visualization service to present this information in a meaningful way to the user. 323 323 331 +(% style="text-align: center;" %) 324 324 [[image:image-20250318221512-33.jpeg||data-xwiki-image-style-alignment="center"]] 325 325 326 326 (% style="text-align: center;" %)