Open lucguillemot opened 4 years ago
This is IMO intended behavior, I would expect that I always get all dimensions back as from a RDF Data Cube vocabulary perspective, they are all mandatory.
Could you explain on an example on why you would expect to get just the referenced dimension back? Maybe we are missing something here but I can't follow so far.
What's the purpose of explicitly using .select
then?
One example that doesn't work if dimensions are "auto-selected" would be to get all DISTINCT values of one dimension:
query.select({ageGroup: ageGroupDim}).distinct()
… currently this returns too many values because DISTINCT is applied to all variable combinations.
Or: If we filter by one dimension, we don't necessarily need to .select
it anymore (we may want to but would like to stay in control). By selecting less fields, we also expect to fetch less data, which is more efficient.
In general it's just unexpected and confusing that using .select
doesn't really align with what's SELECTed.
...
Maybe if this library is intended to deviate from SPARQL more, then actually .select
should be removed altogethe?
Honestly I don't like this approach either, automagically adding things to the select doesn't feel right API-wise.
When running a query like this
I would expect the returned data to only contain the named dimension
ageGroup
and the associated measurement.Actually, the returned data does contain the named dimension and the measure, but also includes all the other dimensions with a generated name
tmpVar1
,tmpVar2
, etc. Is it the desired behavior? I'm using v.0.0.10.Thanks!