home » dokk/data.git
ID: 962939e7eb1b2566937dace8125be9186078af90
20 lines — 829B — View raw


This document contains some useful commands for creating a database of the DOKK
data, that can be queried with SPARQL.

Note: the tools used here are available for download at
      <https://jena.apache.org/download/#apache-jena-binary-distributions>
      Just download "apache-jena-<version>.tar.gz" and "apache-jena-fuseki-<version>.tar.gz"

Create a database:

    tdb2.tdbloader --loc=database dokk/data/*.ttl

Query from command line:

    tdb2.tdbquery --loc=database "select distinct ?s where { ?s ?p ?o } order by ?s limit 10"

It's also possible to start a standalone server (Fuseki) that is queryable via
HTTP. All you have to do is create the database first (with the above commands),
and then start Fuseki. See "fuseki.service" for an example.

    JVM_ARGS="-Xmx8G" ./fuseki-server --loc=database --port=7000 /dokk