Re: How do you explore a SPARQL Endpoint?

It's also good to start exploring with just the ?predicates, because
not all resources necessarily have a type. (Or predicates on a type
might not always be on all instances of that types).

Also, whenever you find a new type of resource - remember to explore
both what it links to

<uri> ?p ?o ;

and what it is linked FROM:

?s ?p <uri>


On 22 January 2015 at 14:46, matteo casu <mattecasu@gmail.com> wrote:
> In order to explore the schema (or better said: the types of the actual
> nodes and properties) you could do:
>
> select ?type1 ?pred ?type2
> where {
> ?subj ?pred ?obj.
> ?subj a ?type1.
> ?obj a ?type2.
> }
>
> Depending on the triple store, it could be useful to filter some trivial
> types.
>
>
> Il 22/01/15 15:28, Thomas Francart ha scritto:
>
> SELECT DISTINCT ?type
> WHERE {   ?x rdf:type ?type . }
>
> SELECT DISTINCT ?p
> WHERE {   ?s ?p ?o .. }
>
> then
>
> SELECT ?s
> WHERE {
>   ?s a <http://uri_of_a_type>
> } LIMIT 100
>
> and then
>
> DESCRIBE <http://uri_of_an_instance>
>
> or
>
> SELECT ?p ?o
> WHERE {
>   <http://uri_of_an_instance> ?p ?o .
> }
>
> Having some statistics on the types may help too :
>
> SELECT ?type (COUNT(?instance) AS ?count)
> WHERE {
>     ?instance a ?type .
> } GROUP BY ?type
>
>
> 2015-01-22 15:19 GMT+01:00 Luca Matteis <lmatteis@gmail.com>:
>>
>> "Give me all your types" seems the most sensible thing to do.
>> Otherwise full text search.
>>
>> On Thu, Jan 22, 2015 at 3:09 PM, Juan Sequeda <juanfederico@gmail.com>
>> wrote:
>> > Assume you are given a URL for a SPARQL endpoint. You have no idea what
>> > data
>> > is being exposed.
>> >
>> > What do you do to explore that endpoint? What queries do you write?
>> >
>> > Juan Sequeda
>> > +1-575-SEQ-UEDA
>> > www.juansequeda.com
>>
>
>
>
> --
>
> Thomas Francart - Sparna
> Consultant Indépendant
> Data, Sémantique, Contenus, Connaissances
> web : http://sparna.fr, blog : http://blog.sparna.fr
> Tel :  +33 (0)6.71.11.25.97
> Fax : +33 (0)9.58.16.17.14
> Skype : francartthomas
>
>



-- 
Stian Soiland-Reyes, eScience Lab
School of Computer Science
The University of Manchester
http://soiland-reyes.com/stian/work/    http://orcid.org/0000-0001-9842-9718

Received on Thursday, 22 January 2015 15:23:19 UTC