Content Constraint

From FMR Knowledge Base
Jump to navigation Jump to search

Overview

Content Constraints define restrictions on Codelists or Series for Data Reporting.

Structure Properties

Structure Type Standard SDMX Structural Metadata Artefact
Maintainable Yes
Identifiable Yes
Item Scheme No
SDMX Information Model Versions 2.0, 2.1
URN - ContentConstraint namespace urn:sdmx:org.sdmx.infomodel.contentconstraint

Context within the SDMX 2.1 Information Model

Content Constraints

The schematic illustrates the core artefacts of the SDMX 2.1 Information Model, and how Content Constraints fit in.

Usage

Constraints can be applied to DSD, Dataflow, Provision Agreement or Data Provider in order to restrict the data being validated or converted. This is to allow organisations flexibility whether to apply constraints and at what level.

Note that regardless of the artefact to which the Constraint is associated, it is constraining the contents of code lists in the DSD to which the constrained object is related.

The Constraint can be of one of two types:

  • Allowable Content
  • Actual

Allowable Content

Allowable content (also known as a Reporting Constraint) defines what data can be reported. For example, a constraint could be defined to ensure that a Data Provider situated in France only reports French Balance of Payments data.

Allowable content constraints can also be used to control how Reference Metadata is reported.

These types of constraints are created and maintained as physical artefacts in the Registry under the Reporting Constraints menu.

Actual

Actual defines what data exists in a data source. This helps with data discovery in that it gives a data consumer information on the scope of data available before querying. The Availability API returns ‘actual’ constraints explaining what codes are available for each dimension.

These types of constraints are created when the Availability query is performed and as such are not stored as physical artefacts in the Registry and are not visibly in the GUI.

Defining Content Constraints

Two options are available for defining Constraints:

Series allows a list of series keys to be included with a wildcard facility available on dimensions.

Cube Region allows the definition of data 'cubes' to either include or exclude and the resulting constraint is the intersection of the various cubes. A cube is defined by specifying a value or list of values for each dimension.

You can read more about creating constraints using the GUI in this article.

Conventions

Content Constraint IDs IDs are conventionally uppercase using underscores '_' as separators if required. Examples:

Agency Content Constraint ID Constrained Structure SDMX-ML
ESTAT CR_HICP_AP_A HICP_AP_A[2.0] [ https://registry.sdmx.org/ws/public/sdmxapi/rest/contentconstraint/UIS/CR_EDUCAT_CLASS_A/1.0 SDMX-ML]
UIS CR_EDUCAT_CLASS_A EDUCAT_CLASS_A[1.0] [ https://registry.sdmx.org/ws/public/sdmxapi/rest/contentconstraint/UIS/CR_EDUCAT_CLASS_A/1.0 SDMX-ML]
WB GHA GHA [ https://demo.metadatatechnology.com/FusionRegistry/ws/public/sdmxapi/rest/contentconstraint/WB/GHA/1.0 SDMX-ML]

You can seem more examples and information on Identities in this article.