- experimental 3.8.2-1
TINYSPARQL-QUERY(1) | TinySPARQL manual | TINYSPARQL-QUERY(1) |
NAME¶
tinysparql-query - Query to SPARQL endpoints.
SYNOPSIS¶
tinysparql query [(-d |--database) <file> | (-b | --dbus-service) <busname> | (-r | --remote-service) <url>]
(-f | --file) <file>] [(-u | --update)] [-a <parameter>:<value>]... [SPARQL]
DESCRIPTION¶
This command allows running queries or updates on a SPARQL endpoint.
When the caller runs a query, the query is in the SPARQL language. This can be done two ways. Either by providing a file with the query or by providing a string with the sparql query.
The file argument can be either a local path or a URI. It also does not have to be an absolute path.
OPTIONS¶
-b, --dbus-service=<service_name>
-d, --database-path=<database_path>
-r, --remote-service=<url>
-f, --file=<file>
-u, --update
-a, --arg=<parameter>:<value>
EXAMPLES¶
Querying a D-Bus endpoint
$ tinysparql query --dbus-service org.example.Endpoint "SELECT ('Hello World' AS ?str) {}"
Updating a database directly from a query in a file
$ tinysparql query --database /tmp/db/ --update --file ./update.rq
Using --arg to provide a arguments to query parameters
$ tinysparql query -b org.example.Endpoint \
-a name:s:"John" -a age:i:42 -a available:b:true \
"SELECT (~name AS ?name) (~age AS ?age) (~available AS ?avail) { }"
SEE ALSO¶
https://gnome.pages.gitlab.gnome.org/tinysparql/tutorial.html.
02/15/2025 | 3.8.2 |