Getting Started
This guide assumes Waratah is already installed — the waratah binary is
on your PATH (a distribution package installs it alongside the
waratah-partition and waratah-registry helper binaries it needs).
Check with:
waratah --version
Everything below happens on one machine: one command starts a complete cluster — three storage partitions, a string registry, and a query compute node — plus the web console.
Start with the demo data
waratah start --load-demo
The command daemonizes itself: it returns once the server is up, and the cluster keeps running in the background. Two things to know:
-
Without
--data-dir, the cluster keeps data in memory — fine for trying it, gone when you stop it. Add--data-dir ./waratah-datato persist to disk instead. -
Logs land in
{data_dir}/logs/output.txtanderror.txt(for the memory backend,./output.txtand./error.txtin the working directory).
The demo dataset is small and visible: two people (alice, bob) who
livesIn two cities (brisbane, hobart), each city with a
hasWeather value, all under the http://ex/ IRI prefix.
Open the console and run a query
Browse to http://127.0.0.1:8080/ — that is the Waratah console. Open the SPARQL workbench, paste this, and run it:
PREFIX ex: <http://ex/>
SELECT ?person ?weather WHERE {
?person ex:livesIn ?city .
?city ex:hasWeather ?weather .
}
Two rows come back: alice / Sunny and bob / Cold. If you have not
met SPARQL before, RDF Basics and
SPARQL Basics walk through the pattern syntax
using this same dataset.
One query from the terminal
To skip the browser entirely, run the query on the command line. This form runs in the foreground and exits after printing the results (it does not start the HTTP server):
waratah start --load-demo --query 'SELECT ?person ?weather WHERE {
?person <http://ex/livesIn> ?city . ?city <http://ex/hasWeather> ?weather . }'
Query over HTTP
Applications reach the same engine through the RDF4J-compatible HTTP API:
curl -G 'http://127.0.0.1:8080/rdf4j/repositories/main' \
--data-urlencode 'query=SELECT ?s ?p ?o WHERE { ?s ?p ?o } LIMIT 5' \
-H 'Accept: text/csv'
The repository is always named main. Content negotiation and the full
request grammar live in the
HTTP API reference.
Check it is healthy
-
http://127.0.0.1:8080/waratah/health— this process. -
http://127.0.0.1:8080/waratah/cluster— the storage partitions and compute node as one snapshot.
Stop the cluster
waratah stop # memory backend (pidfile in the working directory)
waratah stop --data-dir ./waratah-data
Stop ends the compute node, the storage children, and the notebook sidecar, if one is running.
Where next
-
Command Line — what
start,standalone,stop,import, and the maintenance commands do. -
Configuration — pointing the cluster at different addresses, enabling notebooks.
-
Jupyter Notebooks, Geospatial Data, Temporal Data — the integrations and data kinds Waratah knows natively.