Open tboeni opened 10 months ago
Is there a possibility that completely empty columns in Cube Creator are handled differently than columns just having few empty values?
Yes, that actually what is happening, inadvertently. See, the difference in how sh:datatype
is encoded for both dimensions
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix schema: <http://schema.org/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix qudt: <http://qudt.org/schema/qudt/> .
@prefix unit: <http://qudt.org/vocab/unit/> .
@prefix time: <http://www.w3.org/2006/time#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
<https://environment.ld.admin.ch/foen/ubd01041/11/shape/> a sh:NodeShape, <https://cube.link/Constraint> ;
sh:closed true ;
sh:property [
schema:name "Lower LOD"@it, "Lower LOD"@en, "Lower LOD"@fr, "Lower LOD"@de ;
sh:path <https://environment.ld.admin.ch/foen/ubd01041/lowerlod> ;
sh:nodeKind sh:Literal ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:minInclusive 1 ;
sh:maxInclusive 150 ;
qudt:scaleType qudt:RatioScale ;
sh:or (
[
sh:datatype <https://cube.link/Undefined> ;
]
[
sh:datatype xsd:integer ;
]
) ;
], [
schema:name "Upper LOD"@fr, "Upper LOD"@en, "Upper LOD"@it, "Upper LOD"@de ;
sh:path <https://environment.ld.admin.ch/foen/ubd01041/upperlod> ;
sh:in (
""^^<https://cube.link/Undefined>
) ;
sh:nodeKind sh:Literal ;
sh:datatype <https://cube.link/Undefined> ;
sh:minCount 1 ;
sh:maxCount 1 ;
qudt:scaleType qudt:RatioScale ;
] .
Because there are no values of Upper LOD
, Cube Creator does not produce the sh:or
alternative. Right now the datatype is only sourced from final data so if there are no values, only cube:Undefined
remains.
I would need to check again at which stage that is done but technically the CSV Mapping already defines the datatype so it should be possible to apply that to a column without any values.
This issue is brought over from the Visualize Tool Github:
IXT did some investigation on their end and they came to the following conclusion:
Is there a possibility that completely empty columns in Cube Creator are handled differently than columns just having few empty values? Would it be a solution to just simply mark the values in the empty row of "Upper LOD" as
cube:undefined
?