-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from rdf-ext/sparq-example
chore: added sparql example
- Loading branch information
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
PREFIX wd: <http://www.wikidata.org/entity/> | ||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | ||
|
||
CONSTRUCT { | ||
wd:Q842945 rdfs:label ?name. | ||
} WHERE { | ||
wd:Q842945 rdfs:label ?name. | ||
|
||
FILTER (LANG(?name) = "en") | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
./bin/rdf-ext-cli.js \ | ||
--input-endpoint https://query.wikidata.org/sparql \ | ||
--input-query "$(cat examples/query.sparql)" \ | ||
--pretty \ | ||
--output-prefix wd=http://www.wikidata.org/entity/ \ | ||
--output-prefix rdfs=http://www.w3.org/2000/01/rdf-schema# |