Swirrl / cubiql

CubiQL: A GraphQL service for querying multidimensional Linked Data Cubes
Eclipse Public License 1.0
41 stars 2 forks source link

Rationale for filter in initial query #154

Closed ghost closed 6 years ago

ghost commented 6 years ago

When the CubiQL endpoint connects to the SPARQL endpoint, it seems to fire following SPARQL query.

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX qb: <http://purl.org/linked-data/cube#>
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT ?ds ?name ?title ?description ?licence ?issued ?modified ?publisher 
WHERE {
  { SELECT DISTINCT ?ds 
    WHERE {  ?ds a qb:DataSet .} }  
  ?ds <http://www.w3.org/2000/01/rdf-schema#label> ?name .  
  FILTER(LANG(?name) = "")}

which in our case doesn't return anything, since in our case label values have a language attached.

I don't see this constraint anywhere documented.

zeginis commented 6 years ago

At the Cubiql configuration file use :schema-label-language en. You can use the any language tag except from en.

ghost commented 6 years ago

@zeginis Where do I find the documentation on cubiql-config.edn

zeginis commented 6 years ago

Here: https://github.com/Swirrl/graphql-qb/blob/master/doc/table2qb-cubiql.md

See at the bottom of page

ghost commented 6 years ago

Is this something from after release 0.4 ?

ghost commented 6 years ago

Is it possible to ask to return labels according to the preferences of and from the client?

{cubiql{
  datasets {
    uri
    title <-- language returned based on user choice
    dimensions{
     uri}
  } 
}}
lkitching commented 6 years ago

@PaulZH - You can specify the language tag to use in the query with lang_preference e.g.

{cubiql(lang_preference: "fr"){
  datasets {
    uri
    title
    dimensions{
     uri}
  } 
}}
zeginis commented 6 years ago

@PaulZH is this issue fixed by using the lang_preference ?

ghost commented 6 years ago

For most use cases, yes.

Kind regards,

Paul Hermans ProXML (t) +32 15 23 00 76 (m) paul@proxml.bemailto:paul@proxml.be (w) www.proxml.behttp://www.proxml.be

On 30 Oct 2018, at 17:01, zeginis notifications@github.com<mailto:notifications@github.com> wrote:

@PaulZHhttps://github.com/PaulZH is this issue fixed by using the lang_preference ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Swirrl/cubiql/issues/154#issuecomment-434359163, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAauFWOnAocjapvCwe_AJvUJZPWO8Sckks5uqHfVgaJpZM4XwUma.

zeginis commented 6 years ago

This is fixed.