Difference between revisions of "Time Period Format Validation"

From FMR Knowledge Base
Jump to navigation Jump to search
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The Registry will validate observation dates against an expected format. This Data Validator is called “Time Period Format” and enforces that format of the reported time periods match the expected value defined in the DSD. '''Note:''' This Data Validator is only applied if the Data Structure has a dimension called “FREQ”. This time formats are defined as follows:
+
[[Category:Installation_and_Configuration]]
 +
 
 +
[[Category:FMR_Configuration_Reference]]
 +
The Registry will validate observation time periods for consistency with the series frequency value in the FREQ dimension.  
 +
 
 +
This check is not performed if the DSD has no FREQ dimension.
 +
 
 +
Default frequencies and their corresponding valid time period formats are set out in the following table:
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 23: Line 30:
 
|}
 
|}
  
== Alternate Half-Year Format ==
+
== Using 'H' for half-year (semiannual) ==
  
The Registry also supports an alternate Hourly format. With this alternate format, the value of “Half Of Year” may be represented by an '''H''' and the Hourly format is not supported.
+
At ESCB level SDMX data exchanges, there is an agreement to use ‘H’ as the frequency value for semiannual observations with  ‘YYYY-S1’ for TIME_PERIOD format.
  
To enable this mode, the Registry must be started with a Java System variable called “'''TF_ALTERNATE_HALF_YEAR'''” must be specified and set to “'''true'''”.
+
The Registry supports this by setting 'alternate half year' mode under which:
 +
* Frequency value H means half-year (semiannual or semester)
 +
* The hourly frequency is not supported
 +
* 'YYYY-S1' and 'YYYY-H1' are valid TIME_PERIOD formats for half-yearly observations, however time periods are standardised to ‘YYYY-S1’ on conversion (e.g. such as when converting data in Excel to SDMX 2.1 structure specific)
  
The simplest way to perform this is by modifying the setenv.bat or setenv.sh file. To illustrate this:
+
Alternate half year mode is controlled at system level on Registry start-up by setting the Java System variable “'''TF_ALTERNATE_HALF_YEAR'''” to “'''true'''”.
 +
 
 +
If using Apache Tomcat, JAVA_OPTS can be set in the setenv.bat or setenv.sh file:
  
 
   SET JAVA_OPTS=-DTF_ALTERNATE_HALF_YEAR=true
 
   SET JAVA_OPTS=-DTF_ALTERNATE_HALF_YEAR=true
Line 37: Line 49:
 
   (For Unix systems)
 
   (For Unix systems)
  
If this is provided correctly, this will be reported in the startup sequence of the Registry with a log entry like the following:
+
Different procedures may be required for other web application servers like JBoss.
 +
 
 +
The Fusion Registry system log will report the following message:
  
 
   2021-12-31 23:59:59.123 INFO main io.sdmx.core.fmr.application.FusionRegistryApplicationInitialiser - Using 'Alternate Half-Year' Setting
 
   2021-12-31 23:59:59.123 INFO main io.sdmx.core.fmr.application.FusionRegistryApplicationInitialiser - Using 'Alternate Half-Year' Setting
 +
 +
Active system properties can also be queried using the REST API [[System_Properties|here]].
 +
 +
== Is Alternate Half-Format set ==
 +
 +
On startup the Fusion Registry system log will report the following message:
 +
 +
2021-12-31 23:59:59.123 INFO main io.sdmx.core.fmr.application.FusionRegistryApplicationInitialiser - Using 'Alternate Half-Year' Setting
 +
 +
Active system properties can also be queried using the REST API which is detailed [[System_Properties|here]].

Latest revision as of 07:40, 17 April 2024

The Registry will validate observation time periods for consistency with the series frequency value in the FREQ dimension.

This check is not performed if the DSD has no FREQ dimension.

Default frequencies and their corresponding valid time period formats are set out in the following table:

Format Frequency Code Example Usage
Yearly A 2001
Half-Of-Year S 2001-S1
Third-Of-Year T 2001-T3
Quarter-Of-Year Q 2001-Q4
Month M 2001-12
Week W 2001-W52
Date D 2001-12-31
Hour H 2001-12-31T23
Date Time I 2001-12-31T23:59:59

Using 'H' for half-year (semiannual)

At ESCB level SDMX data exchanges, there is an agreement to use ‘H’ as the frequency value for semiannual observations with ‘YYYY-S1’ for TIME_PERIOD format.

The Registry supports this by setting 'alternate half year' mode under which:

  • Frequency value H means half-year (semiannual or semester)
  • The hourly frequency is not supported
  • 'YYYY-S1' and 'YYYY-H1' are valid TIME_PERIOD formats for half-yearly observations, however time periods are standardised to ‘YYYY-S1’ on conversion (e.g. such as when converting data in Excel to SDMX 2.1 structure specific)

Alternate half year mode is controlled at system level on Registry start-up by setting the Java System variable “TF_ALTERNATE_HALF_YEAR” to “true”.

If using Apache Tomcat, JAVA_OPTS can be set in the setenv.bat or setenv.sh file:

 SET JAVA_OPTS=-DTF_ALTERNATE_HALF_YEAR=true
 (For Windows systems)
 export JAVA_OPTS=-DTF_ALTERNATE_HALF_YEAR=true
 (For Unix systems)

Different procedures may be required for other web application servers like JBoss.

The Fusion Registry system log will report the following message:

 2021-12-31 23:59:59.123 INFO main io.sdmx.core.fmr.application.FusionRegistryApplicationInitialiser - Using 'Alternate Half-Year' Setting

Active system properties can also be queried using the REST API here.

Is Alternate Half-Format set

On startup the Fusion Registry system log will report the following message:

2021-12-31 23:59:59.123 INFO main io.sdmx.core.fmr.application.FusionRegistryApplicationInitialiser - Using 'Alternate Half-Year' Setting

Active system properties can also be queried using the REST API which is detailed here.