zazuko / barnard59

An intuitive and flexible RDF pipeline solution designed to simplify and automate ETL processes for efficient data management.
26 stars 2 forks source link

dimensions of scaleType nominal and ordinal shall have a `sh:in` list of their elements regardless the datatype #328

Open Rdataflow opened 1 week ago

Rdataflow commented 1 week ago

cubes can have nominal or ordinal dimensions of Literals i.e. Integer

also in those cases we expect those dimensions to have a list of their elements attached at sh:in

i.e. a cube like https://s.zazuko.com/2k9QjTi having a nominal dimension containing a single value of "50"^^xsd:integer shall have a shape containing

<dim> sh:in ( 50 ) .

use case - see Info for _https://energy.ld.admin.ch/sfoe/bfe_ogd56_energieperspektiven2050/KKWLaufzeit_ on https://cube-validator.lindas.admin.ch/validate/https:%2F%2Ftest.lindas.admin.ch%2Fquery/https:%2F%2Fenergy.ld.admin.ch%2Fsfoe%2Fbfe_ogd56_energieperspektiven2050%2F3?tab=cube

tpluscode commented 6 days ago

ping @l00mi

From what I understand, it has been by-design that numeric dimensions always generate sh:minValue/sh:maxValue constraints and not sh:in. Or is it ok to force sh:in for all nominal and ordinal dimensions regardless of their values.

I think the problem might be that calculating the constraints is not in any way connected to the metadata. In other words, we don't know the dimension's data kind when building a sh:in list (or not)