Created
June 11, 2020 06:42
-
-
Save jaw111/902a03f40eca46b685a1096fda1d3542 to your computer and use it in GitHub Desktop.
Tarql federation example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
id | name | |
---|---|---|
1 | SPARQL | |
2 | SQL | |
3 | XQuery |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
base <http://example.com/id/> | |
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> | |
prefix owl: <http://www.w3.org/2002/07/owl#> | |
construct { | |
?iri rdfs:label ?name ; | |
owl:sameAs ?s . | |
} | |
where { | |
bind(iri(?id) as ?iri) | |
service <https://dbpedia.org/sparql> { | |
?s a <http://dbpedia.org/ontology/ProgrammingLanguage> ; | |
rdfs:label ?label . | |
filter langMatches(lang(?label), "EN" ) | |
} | |
filter(str(?label) = ?name) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | |
@prefix owl: <http://www.w3.org/2002/07/owl#> . | |
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | |
<http://example.com/id/1> | |
rdfs:label "SPARQL" ; | |
owl:sameAs <http://dbpedia.org/resource/SPARQL> . | |
<http://example.com/id/2> | |
rdfs:label "SQL" ; | |
owl:sameAs <http://dbpedia.org/resource/SQL> . | |
<http://example.com/id/3> | |
rdfs:label "XQuery" ; | |
owl:sameAs <http://dbpedia.org/resource/XQuery> . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
tarql mapping.rq data.csv > result.ttl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment