Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Query using SPARQL service

64 views
Skip to first unread message

Charan Puvvala

unread,
Feb 23, 2018, 8:54:45 AM2/23/18
to Getty Vocabularies as Linked Open Data
I am trying to query getty TGN which is huge for me to load. I get this error 

"500 SPARQL-QUERY: ?Service calls not supported"

Doesn't getty support sparql queries directly as a service? Am I missing something?

Richard Light

unread,
Feb 23, 2018, 9:06:43 AM2/23/18
to gettyv...@googlegroups.com

Charan,

What access point are you using? http://vocab.getty.edu/sparql ?

Richard

--
You received this message because you are subscribed to the Google Groups "Getty Vocabularies as Linked Open Data" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gettyvocablo...@googlegroups.com.
To post to this group, send email to gettyv...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gettyvocablod/535bd79d-649e-40e3-9530-deba88350ba6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Richard Light

Charan Puvvala

unread,
Feb 23, 2018, 9:09:18 AM2/23/18
to Getty Vocabularies as Linked Open Data
Yes I am using the same one
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX gvp
: <http://vocab.getty.edu/ontology#>
PREFIX schema
: <http://schema.org/>
SELECT
?focus ?biographyPreferred ?birthPlace ?deathPlace ?dPlace WHERE {
 
{
   
?person foaf:focus ?focus.
   
?focus gvp:biographyPreferred ?biographyPreferred.
   
?biographyPreferred schema:birthPlace ?birthPlace.
   
?biographyPreferred schema:deathPlace ?deathPlace.
 
}
  SERVICE
<http://vocab.getty.edu/sparql> {
     
?dPlace foaf:focus ?deathPlace .
   
}
  FILTER
(?person = <http://vocab.getty.edu/ulan/500010879>)
}

Richard Light

unread,
Feb 23, 2018, 9:26:45 AM2/23/18
to gettyv...@googlegroups.com

Charan,

Why you do need to call out that specific criterion as a separate service call?  I simplified your search to:

PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX gvp: <http://vocab.getty.edu/ontology#>
PREFIX schema: <http://schema.org/>
SELECT ?focus ?biographyPreferred ?birthPlace ?deathPlace ?dPlace WHERE {
  {
    ?person foaf:focus ?focus.
    ?focus gvp:biographyPreferred ?biographyPreferred.
    ?biographyPreferred schema:birthPlace ?birthPlace.
    ?biographyPreferred schema:deathPlace ?deathPlace.

    ?dPlace foaf:focus ?deathPlace .
   }
  FILTER(?person = <http://vocab.getty.edu/ulan/500010879>)
}

and it returned a result immediately.  Are you searching other endpoints as well, and if so where are you performing the [federated] search?

Richard


For more options, visit https://groups.google.com/d/optout.

--
Richard Light

Charan Puvvala

unread,
Feb 23, 2018, 9:39:46 AM2/23/18
to Getty Vocabularies as Linked Open Data
I have a metaphacts instance which has the ULAN vocab imported. I do not have enough space to import the TGN, hence trying to query remotely to get the name of the place.

Richard Light

unread,
Feb 23, 2018, 9:48:16 AM2/23/18
to gettyv...@googlegroups.com

On 23/02/2018 14:39, Charan Puvvala wrote:
I have a metaphacts instance which has the ULAN vocab imported. I do not have enough space to import the TGN, hence trying to query remotely to get the name of the place.
Thanks for the explanation.  In that case, I think we all wait for someone from the Getty to pop up and answer your original question.  Though I suspect the answer will be 'no we don't'.  The error message is pretty unequivocal.

Best wishes,

Richard


For more options, visit https://groups.google.com/d/optout.

--
Richard Light

Charan Puvvala

unread,
Feb 23, 2018, 9:50:09 AM2/23/18
to Getty Vocabularies as Linked Open Data
Richard,

No problem, that was my initial suspicion as well. Thanks for your time. Lots of your other discussion posts helped me. :)

Kevin Ford

unread,
Feb 23, 2018, 11:59:08 AM2/23/18
to gettyv...@googlegroups.com
Hi Charan,

I think this is an issue with metaphacts, which you said you were using
in another post.

*Your* SPARQL query is hitting metaphacts's /sparql endpoint and I
suspect it is *your* SPARQL endpoint saying, effectively, "this sparql
endpoint does not implement the Sparql 1.1 SERVICE keyword." I've done
some light searching to determine whether metaphacts supports this
feature or not, but I've had no success.

FWIW, if I start a local copy of blazegraph - a triplestore that
implements the Sparql 1.1 SERVICE extension - and I execute the
following query, I get results back (from Getty):

SELECT *
WHERE {
SERVICE <http://vocab.getty.edu/sparql> {
?gs ?gp "Gogh, Vincent van" .
}
}

Blazegraph is effectively querying Getty's sparql endpoint just as any
client would. Said another way, Getty really doesn't need to do
anything on its end, beyond establishing a sparql endpoint, which it has
done, to respond to the SERVICE request. Blazegraph or metaphacts,
however, must have the smarts to understand what to do with the SERVICE
keyword. The former does, but I'm doubtful at this time that metaphacts
does.

HTH,
Kevin


On 2/23/18 07:54, Charan Puvvala wrote:
> I am trying to query getty TGN which is huge for me to load. I get this
> error
>
> *"*500 SPARQL-QUERY: *?Service calls not supported"*
> *
> *
> Doesn't getty support sparql queries directly as a service? Am I missing
> something?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Getty Vocabularies as Linked Open Data" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to gettyvocablo...@googlegroups.com
> <mailto:gettyvocablo...@googlegroups.com>.
> To post to this group, send email to gettyv...@googlegroups.com
> <mailto:gettyv...@googlegroups.com>.
> <https://groups.google.com/d/msgid/gettyvocablod/535bd79d-649e-40e3-9530-deba88350ba6%40googlegroups.com?utm_medium=email&utm_source=footer>.

Kevin Ford

unread,
Feb 23, 2018, 12:09:38 PM2/23/18
to Richard Light, gettyv...@googlegroups.com
Hi Richard, Charan, all:

I want to offer a modest and collegial tweak to Richard's query. The
FILTER is unnecessary. This will work too:

PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX gvp: <http://vocab.getty.edu/ontology#>
PREFIX schema: <http://schema.org/>
SELECT ?focus ?biographyPreferred ?birthPlace ?deathPlace ?dPlace WHERE {
<http://vocab.getty.edu/ulan/500010879> foaf:focus ?focus.
?focus gvp:biographyPreferred ?biographyPreferred.
?biographyPreferred schema:birthPlace ?birthPlace.
?biographyPreferred schema:deathPlace ?deathPlace.
?dPlace foaf:focus ?deathPlace .
}

I only bring this up because, while I think it is fantastic that Getty's
triplestore (it's OpenLink, yes?) optimizes the query under the hood and
handles this pattern with speed and efficiency, other, less-optimized
triplestores *might* return the entire result set and *then* perform the
FILTER. That could be costly for the endpoint.

Since the subject is known, we can initiate the query using that as an
anchor, or starting point.

All the best,
Kevin
>>> *"*500 SPARQL-QUERY: *?Service calls not supported"*
>>> *
>>> *
>>> Doesn't getty support sparql queries directly as a service? Am I
>>> missing something?
>>> --
>>> You received this message because you are subscribed to the
>>> Google Groups "Getty Vocabularies as Linked Open Data" group.
>>> To unsubscribe from this group and stop receiving emails from it,
>>> send an email to gettyvocablo...@googlegroups.com.
>>> To post to this group, send email to gettyv...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/gettyvocablod/535bd79d-649e-40e3-9530-deba88350ba6%40googlegroups.com
>>> <https://groups.google.com/d/msgid/gettyvocablod/535bd79d-649e-40e3-9530-deba88350ba6%40googlegroups.com?utm_medium=email&utm_source=footer>.
>>> For more options, visit https://groups.google.com/d/optout
>>> <https://groups.google.com/d/optout>.
>>
>> --
>> *Richard Light*
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Getty Vocabularies as Linked Open Data" group.
>> To unsubscribe from this group and stop receiving emails from it, send
>> an email to gettyvocablo...@googlegroups.com
>> <mailto:gettyvocablo...@googlegroups.com>.
>> To post to this group, send email to gettyv...@googlegroups.com
>> <mailto:gettyv...@googlegroups.com>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/gettyvocablod/ef628856-c027-4d02-bc5b-9b23706caee5%40googlegroups.com
>> <https://groups.google.com/d/msgid/gettyvocablod/ef628856-c027-4d02-bc5b-9b23706caee5%40googlegroups.com?utm_medium=email&utm_source=footer>.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> *Richard Light*
>
> --
> You received this message because you are subscribed to the Google
> Groups "Getty Vocabularies as Linked Open Data" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to gettyvocablo...@googlegroups.com
> <mailto:gettyvocablo...@googlegroups.com>.
> To post to this group, send email to gettyv...@googlegroups.com
> <mailto:gettyv...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/gettyvocablod/a6191b7e-b11d-6d5c-26ce-3522fac9ce3f%40light.demon.co.uk
> <https://groups.google.com/d/msgid/gettyvocablod/a6191b7e-b11d-6d5c-26ce-3522fac9ce3f%40light.demon.co.uk?utm_medium=email&utm_source=footer>.

Richard Light

unread,
Feb 23, 2018, 12:14:46 PM2/23/18
to Kevin Ford, gettyv...@googlegroups.com

Good call, Kevin: thank you for pointing that out.

Richard
.


--
Richard Light

vladimir...@ontotext.com

unread,
Feb 24, 2018, 5:30:43 AM2/24/18
to Getty Vocabularies as Linked Open Data
Charan, Metaphacts don't make a repository. AFAIK they use Blazegraph most of the time.
Kevi, the Getty repo is Ontotext GraphDB.
Cheers!
Reply all
Reply to author
Forward
0 new messages