SDMX-ML Structure Specific Data

From Fusion Registry Wiki
Revision as of 00:48, 29 September 2022 by Mnelson (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

see Data Formats

Overview

The Structure Specific data format (formally known as Compact format) is an official SDMX format. It is known as one of the SDMX-ML formats, in that it is SDMX whose representation is in XML.

Unlike the SDMX-ML Generic data format, the XML Elements and XML Attributes are the based on the Data Structure Definition that the data is being transmitted for, this provides two main benefits:

  1. It is possible to validate that the dataset is reporting the correct values using a SDMX Schema
  2. The dataset is more compact, in terms of the volume of information used to transmit the dataset.

The SDMX-ML Structure Specific format was introduced in version 1.0 of the SDMX Specification, and exists in all subsequent releases, up to the current release of version 2.1. In releases prior to 2.1 the data format was called 'Compact' data.

SDMX-ML Structure Specific can be used as both an import and export format for the Fusion Registry, and an export format for the Fusion Edge Server and Fusion Data Browser.

Formatting Using Query Parameters

The following URL parameters can be used in a RESTful query for to get Generic data.

  • format = sdmx-compact-2.1
  • format = sdmx-compact-2.0
  • format = sdmx-compact-1.0

Example https://demo.metadatatechnology.com/FusionRegistry/ws/public/sdmxapi/rest/data/WB,GCI,1.0/GHA.GCI..?format=sdmx-compact-2.1

Note: The same formatting can be applied using HTTP Accept Headers as opposed to query parameters.

Example Output

https://demo.metadatatechnology.com/FusionRegistry/ws/public/sdmxapi/rest/data/WB,GCI,1.0/GHA.GCI..?format=sdmx-compact-2.1

The output below shows a snippet of the XML - displaying two series definition with their respective observation values

 		<Series REF_AREA="GHA" INDICATOR="GCI" SUB_INDICATOR="RANK" FREQ="A">
			<Obs TIME_PERIOD="2008" OBS_VALUE="102"/>
			<Obs TIME_PERIOD="2009" OBS_VALUE="114"/>
			<Obs TIME_PERIOD="2010" OBS_VALUE="114"/>
			<Obs TIME_PERIOD="2011" OBS_VALUE="114"/>
			<Obs TIME_PERIOD="2012" OBS_VALUE="103"/>
			<Obs TIME_PERIOD="2013" OBS_VALUE="114"/>
			<Obs TIME_PERIOD="2014" OBS_VALUE="111"/>
			<Obs TIME_PERIOD="2015" OBS_VALUE="119"/>
			<Obs TIME_PERIOD="2016" OBS_VALUE="114"/>
			<Obs TIME_PERIOD="2017" OBS_VALUE="111"/>
		</Series>
		<Series REF_AREA="GHA" INDICATOR="GCI" SUB_INDICATOR="VALUE" FREQ="A">
			<Obs TIME_PERIOD="2008" OBS_VALUE="3.616139933"/>
			<Obs TIME_PERIOD="2009" OBS_VALUE="3.448062477"/>
			<Obs TIME_PERIOD="2010" OBS_VALUE="3.55568976"/>
			<Obs TIME_PERIOD="2011" OBS_VALUE="3.64915433"/>
			<Obs TIME_PERIOD="2012" OBS_VALUE="3.792629136"/>
			<Obs TIME_PERIOD="2013" OBS_VALUE="3.693773108"/>
			<Obs TIME_PERIOD="2014" OBS_VALUE="3.713529283"/>
			<Obs TIME_PERIOD="2015" OBS_VALUE="3.582722052"/>
			<Obs TIME_PERIOD="2016" OBS_VALUE="3.679439434"/>
			<Obs TIME_PERIOD="2017" OBS_VALUE="3.72270246361418"/>
		</Series>
.....


An example dataset with the returned detail set to series keys only
https://demo.metadatatechnology.com/FusionRegistry/ws/public/sdmxapi/rest/data/WB,GCI,1.0/GHA.GCI..?format=sdmx-compact-2.1&detail=serieskeysonly

The output below shows a snippet of the XML - displaying the two series returned from the query

	<Series REF_AREA="GHA" INDICATOR="GCI" SUB_INDICATOR="RANK" FREQ="A" />
	<Series REF_AREA="GHA" INDICATOR="GCI" SUB_INDICATOR="VALUE" FREQ="A" />