Skip to content

dajobe/sparyql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SPARYQL

SPARQL + YQL = SPARYQL

Try these queries in the YQL Console

  1. Example 1: get all triples from a FOAF file

    
    use "http://triplr.org/sparyql/sparql.xml" as sparql;
    select * from sparql where query="PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT $s $p $o FROM <http://www.dajobe.org/foaf.rdf> WHERE { $s $p $o } LIMIT 10"
      and service="http://sparql.org/sparql"
    
  2. Example 2: get friend's nick and names from a FOAF file

    
    use "http://triplr.org/sparyql/sparql.xml" as sparql;
    select * from sparql where query="PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT $nick $name FROM <http://www.dajobe.org/foaf.rdf> WHERE { $x a foaf:Person . $x foaf:nick $nick . $x foaf:name $name }"
      and service="http://sparql.org/sparql"
    
  3. Example 3 - select just one field: value of object triple

    
    use "http://triplr.org/sparyql/sparql.xml" as sparql;
    select result.o.value from sparql where query="PREFIX foaf:  SELECT $s $p $o FROM  WHERE { $s $p $o } LIMIT 10"
      and service="http://sparql.org/sparql"
    

Releases

No releases published

Packages

No packages published