Difference between revisions of "Check Database Consistency Web Service"

From FMR Knowledge Base
Jump to navigation Jump to search
(Examples)
(Overview)
Line 1: Line 1:
 
=Overview=
 
=Overview=
The Fusion Metadata Registry (version 11), stores maintainable structures in a number of forms within its database.  
+
The Fusion Metadata Registry (version 11), stores maintainable structures in a number of forms within its database. It is extremely unlikely that these formats become inconsistent, but a mechanism exists to check that the various forms are consistent.
 +
 
 +
==Detail==
 +
The Fusion Metadata Registry stores structure metadata in the following tables:
 +
* registry_maintainable_ser - the Java serialised form of the structure. This is loaded on application startup since it is faster than constructing a new Java object from the XML.
 +
* registry_maintainable_sdmx - the SDMX-ML form of the individual metadata structure
 +
* tx_backup - the SDMX-ML form of structures, grouped together by the transaction they were submitted within rather than storing each structure individually.
 +
 
 +
 
  
 
==Check Database Consistency Web Service==
 
==Check Database Consistency Web Service==
Line 16: Line 24:
 
<p><b>400</b> - Unauthorized</p>
 
<p><b>400</b> - Unauthorized</p>
 
|}
 
|}
 +
 +
Note: Because the service has to talk to the back-end database, it may take a while to run. The time taken depends upon the speed of connection to the database and the number of structural metadata within your Registry.
 +
 +
==Example Output==
 +
The Web Service produces JSON output like the following:
 +
<pre>
 +
{
 +
  "Consistency": false,
 +
  "MaintainablesChecked": 2053,
 +
  "DifferingSdmx": [
 +
    "[]"
 +
  ],
 +
  "DifferingTxn": [
 +
    "[urn:sdmx:org.sdmx.infomodel.codelist.Codelist=SDMX:AAA(1.0)]"
 +
  ]
 +
}
 +
</pre>
  
 
==Examples==
 
==Examples==

Revision as of 07:31, 4 April 2025

Overview

The Fusion Metadata Registry (version 11), stores maintainable structures in a number of forms within its database. It is extremely unlikely that these formats become inconsistent, but a mechanism exists to check that the various forms are consistent.

Detail

The Fusion Metadata Registry stores structure metadata in the following tables:

  • registry_maintainable_ser - the Java serialised form of the structure. This is loaded on application startup since it is faster than constructing a new Java object from the XML.
  • registry_maintainable_sdmx - the SDMX-ML form of the individual metadata structure
  • tx_backup - the SDMX-ML form of structures, grouped together by the transaction they were submitted within rather than storing each structure individually.


Check Database Consistency Web Service

Entry Point /ws/secure/structure/databaseconsistency
Access Secure
Http Method GET
Response Format JSON
Response Statuses

200 - Success

400 - Unauthorized

Note: Because the service has to talk to the back-end database, it may take a while to run. The time taken depends upon the speed of connection to the database and the number of structural metadata within your Registry.

Example Output

The Web Service produces JSON output like the following:

{
  "Consistency": false,
  "MaintainablesChecked": 2053,
  "DifferingSdmx": [
    "[]"
  ],
  "DifferingTxn": [
    "[urn:sdmx:org.sdmx.infomodel.codelist.Codelist=SDMX:AAA(1.0)]"
  ]
}

Examples

An example of the consistency checker being invoked:

https://example.registry.com/ws/secure/structure/databaseconsistency