aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPjotr Prins2023-08-20 11:36:39 +0200
committerPjotr Prins2023-08-20 11:36:39 +0200
commita7c9ea3394cc8604e8ac2baeb927d50b701f2606 (patch)
tree9b5554094ae981ed880f42d9e8c05eaa2eaafc17
parenta7cbd689f344c4a3afd0903d09cdfb82bccd4c96 (diff)
downloadgn-docs-a7c9ea3394cc8604e8ac2baeb927d50b701f2606.tar.gz
SPARQL count datasets
-rw-r--r--api/sparql-endpoint.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/api/sparql-endpoint.md b/api/sparql-endpoint.md
index d0f1fdb..0b04c6b 100644
--- a/api/sparql-endpoint.md
+++ b/api/sparql-endpoint.md
@@ -104,6 +104,25 @@ Another way to list datasets with the name that is used in GN:
}
```
+To list all datasets
+
+```
+ SELECT DISTINCT ?dataset ?datasetName WHERE {
+ ?dataset rdf:type/rdfs:subClassOf gnc:dataset .
+ ?dataset rdfs:label ?datasetName .
+
+ }
+```
+
+And count them!
+
+```
+ SELECT count(?dataset) WHERE {
+ ?dataset rdf:type/rdfs:subClassOf gnc:dataset .
+ }
+```
+
+893 at last count(!)
- info_dataset("CB_M_1004_P") - Get meta information about a data set using the GN name: