Difference between revisions of "SDMX-ML Generic Data"

From Fusion Registry Wiki
Jump to navigation Jump to search
(Example Output)
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
[[Category:SdmxDataFormat]]
 
[[Category:SdmxDataFormat]]
 
+
see [https://wiki.sdmxcloud.org/Category:SdmxDataFormat Data Formats]
 
=Overview=
 
=Overview=
 
The Generic Data 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 [https://www.w3.org/XML/ XML].
 
The Generic Data 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 [https://www.w3.org/XML/ XML].
  
The use case for the Generic data format, over the other SDMX-ML formats, is that the XML Elements and XML Attributes are the same, regardless of the dataset.  In contrast the SDMX-ML Structure Specific data format has XML Elements and XML Attributes based on the [[Data_Structure_Definition|Data Structure Definition]] that the data is being transmitted for.   
+
The use case for the Generic data format, over the other SDMX-ML formats, is that the XML Elements and XML Attributes are the same, regardless of the dataset.  In contrast the [[SDMX-ML_Structure_Specific_Data|SDMX-ML Structure Specific]] data format has XML Elements and XML Attributes based on the [[Data_Structure_Definition|Data Structure Definition]] that the data is being transmitted for.   
  
 
The SDMX-ML Generic 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.
 
The SDMX-ML Generic 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.
 +
 +
SDMX-ML Genric Data 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=
 
=Formatting Using Query Parameters=
Line 22: Line 24:
 
<i>https://demo.metadatatechnology.com/FusionRegistry/ws/public/sdmxapi/rest/data/WB,GCI,1.0/GHA.GCI..?format=sdmx-generic-2.1</i>
 
<i>https://demo.metadatatechnology.com/FusionRegistry/ws/public/sdmxapi/rest/data/WB,GCI,1.0/GHA.GCI..?format=sdmx-generic-2.1</i>
  
 
+
The output below shows a snippet of the XML - displaying a series definition with three observation values
An example dataset with IDs only, spaces have been added to this example to assist readability.
 
 
<pre>
 
<pre>
 
  <generic:Series>
 
  <generic:Series>
Line 50: Line 51:
 
An example dataset with the returned detail set to series keys only - fewer columns are written to the response.<br/>
 
An example dataset with the returned detail set to series keys only - fewer columns are written to the response.<br/>
 
<i>https://demo.metadatatechnology.com/FusionRegistry/ws/public/sdmxapi/rest/data/WB,GCI,1.0/GHA.GCI..?format=sdmx-generic-2.1&detail=serieskeysonly</i>
 
<i>https://demo.metadatatechnology.com/FusionRegistry/ws/public/sdmxapi/rest/data/WB,GCI,1.0/GHA.GCI..?format=sdmx-generic-2.1&detail=serieskeysonly</i>
 +
 +
The output below shows a snippet of the XML - displaying the two series returned from the query
 
<pre>
 
<pre>
  

Latest revision as of 00:50, 29 September 2022

see Data Formats

Overview

The Generic Data 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.

The use case for the Generic data format, over the other SDMX-ML formats, is that the XML Elements and XML Attributes are the same, regardless of the dataset. In contrast the SDMX-ML Structure Specific data format has XML Elements and XML Attributes based on the Data Structure Definition that the data is being transmitted for.

The SDMX-ML Generic 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.

SDMX-ML Genric Data 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-generic-2.1
  • format = sdmx-generic-2.0
  • format = sdmx-generic-1.0

Example https://demo.metadatatechnology.com/FusionRegistry/ws/public/sdmxapi/rest/data/WB,GCI,1.0/GHA.GCI..?format=sdmx-generic-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-generic-2.1

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

 		<generic:Series>
			<generic:SeriesKey>
				<generic:Value id="REF_AREA" value="GHA"/>
				<generic:Value id="INDICATOR" value="GCI"/>
				<generic:Value id="SUB_INDICATOR" value="RANK"/>
				<generic:Value id="FREQ" value="A"/>
			</generic:SeriesKey>
			<generic:Obs>
				<generic:ObsDimension value="2008"/>
				<generic:ObsValue value="102"/>
			</generic:Obs>
			<generic:Obs>
				<generic:ObsDimension value="2009"/>
				<generic:ObsValue value="114"/>
			</generic:Obs>
			<generic:Obs>
				<generic:ObsDimension value="2010"/>
				<generic:ObsValue value="114"/>
			</generic:Obs>
.....


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

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


	<generic:Series>
		<generic:SeriesKey>
			<generic:Value id="REF_AREA" value="GHA"/>
			<generic:Value id="INDICATOR" value="GCI"/>
			<generic:Value id="SUB_INDICATOR" value="RANK"/>
			<generic:Value id="FREQ" value="A"/>
		</generic:SeriesKey>
	</generic:Series>
	<generic:Series>
		<generic:SeriesKey>
			<generic:Value id="REF_AREA" value="GHA"/>
			<generic:Value id="INDICATOR" value="GCI"/>
			<generic:Value id="SUB_INDICATOR" value="VALUE"/>
			<generic:Value id="FREQ" value="A"/>
		</generic:SeriesKey>
	</generic:Series>