Disallow identical levels in a hierarchy.
Closed this issue · 2 comments
cyberbikepunk commented
Working with the first upload of the Mexican federal budget, I came across, this dimension definition:
{"fin-source": {
"dimensionType": "other",
"primaryKey": [
"ID_FF",
"Fuente_Financiamiento"
],
"attributes": {
"ID_FF": {
"source": "ID_FF",
"title": "ID_FF"
},
"Fuente_Financiamiento": {
"source": "Fuente_Financiamiento",
"title": "Fuente_Financiamiento",
"labelfor": "ID_FF"
}
}
},
}
Basically, what's happening here is that ID_FF
is the code for the Fuente_Financiamiento
label. This is obviously a screw-up: the two levels in the hierarchy are in fact identical. This situation, however, could potentially be prevented, since we could check whether two the levels return the same lines in the data. Do we want to flag the user about this?
I'm aware this is not of the highest priority but I thought I'd raise this anyways.
pwalsh commented
Hey. Wrong repo :). openspending/openspending
cyberbikepunk commented
i thought that might be the case ;-P