Dataflows with Content Constraints applied return 'restricted' data if a user queries it directly
A dataflow exists with a content constraint applied restricting the dataflow to a small subset of data loaded to the data structure.
When a user requests all data from that dataflow or a query that doesn't include any restricted codes then restricted data is not returned - this is expected behavior.
When a user requests data from that dataflow with a query that includes restricted codes then restricted data is returned - this is not expected behavior.
Is this a bug or is this how content constraints are intended to work?
Example:
- The dataflow
DF_SDG_7
in the Pacific Data Hub .Stat has a constraint applied on theSDG_SERIES
dimension restricting it to the following codes:EG_ACS_ELEC
,EG_EGY_CLEAN
,EG_FEC_RNEW
,EG_EGY_PRIM
,SPC_7_a_1
,SPC_7_b_1
- If you request all data from that dataflow then you only receive a subset of data as defined by that content constraint eg: https://stats.pacificdata.org/data-nsi/Rest/data/SPC,DF_SDG_7,1.0/all (note code
SI_POV_DAY1
is not present) - However if you query that dataflow and ask for a restricted code for that dimension the 'restricted' data is returned to you eg: https://stats.pacificdata.org/data-nsi/Rest/data/SPC,DF_SDG_7,1.0/.SI_POV_DAY1........../?startPeriod=2005&endPeriod=2018&dimensionAtObservation=AllDimensions
Edited by Hugh Stehlik