Refactor and enhance how DLM retrieves the number of observations (or series) per dataflow
As Jens,
I want the API calls used by the DLM to retrieve the number of observations per dataflow to be changed,
So that the information can be retrieved much faster and with a higher reliability, because the new calls are using more standards API features, supported also by other SDMX technologies.
Functional specifications
-
In order to retrieve the number of observations per dataflow instantly, the DLM should query for the pre-generated actual content constraint attached to the dataflow. The number of observations currently available in the dataflow is likely to be returned in the annotation of type
sdmx_metrics
and idobs_count
.
Example: https://nsi-qa-stable.siscc.org/rest/dataflow/UNICEF/MG/1.0?references=contentconstraint<common:Annotation id="obs_count"> <common:AnnotationTitle>2561</common:AnnotationTitle> <common:AnnotationType>sdmx_metrics</common:AnnotationType> </common:Annotation>
-
If the number of observations is not found by using this query (e.g. MT Fusion Registry doesn't pre-generate actual CC, or in case of old, not yet re-generated .Stat actual constraints), then the DLM should automatically perform a second query that dynamically generates an actual content constraint through the
availableconstraint
query:
Example: https://nsi-qa-stable.siscc.org/rest/availableconstraint/UNICEF,MG,1.0/all?mode=exactNote: This query is slower than query 1 because it dynamically generates the constraint. This is the reason, why we call this only as second trial.
ATTENTION: Instead of returning the number of observations, MT Fusion Registry returns the number of series.
<com:Annotation id="series_count"> <com:AnnotationTitle>38270</com:AnnotationTitle> <com:AnnotationType>sdmx_metrics</com:AnnotationType> </com:Annotation>
If the annotation of type
sdmx_metrics
has no idobs_count
, but instead the idseries_count
, then the DLM should display this (localisable!) number of series (instead of observations), e.g.