TINYSPARQL-QUERY(1)

✨ NAME ✨

Okay so this is tinysparql-query β€” Query to SPARQL endpoints. And yes bestie, this is the TINYSPARQL-QUERY(1) page from the TinySPARQL manual. We're getting into it. πŸ’…


🌸 SYNOPSIS 🌸

tinysparql query [(-d |--database) <file> | (-b | --dbus-service) <busname> | (-r | --remote-service) <url>]
    (-f | --file) <file>] [(-u | --update)] [-a <parameter>:<value>]... [SPARQL]

πŸ¦‹ DESCRIPTION πŸ¦‹

So this command is literally your key to running queries or updates on a SPARQL endpoint. It's giving "I speak fluent graph database" energy. ✨

When you run a query, it's in the SPARQL language. You can do this two ways: either hand it a file with the query, or give it a string with the SPARQL query. Both are iconic β€” pick your vibe.

The <file> argument can be a local path or a URI. It also does not have to be an absolute path β€” so no stress about full paths, fr fr. 🫢

πŸ’… OPTIONS πŸ’…

  • -b, --dbus-service=<service_name> β€” Connects to a SPARQL endpoint at a D-Bus name. (D-Bus girlies rise! 🌸)
  • -d, --database-path=<database_path> β€” Connects to a database by location in the filesystem. (Local filesystem queen. πŸŽ€)
  • -r, --remote-service=<url> β€” Connects to a HTTP SPARQL endpoint. (HTTP vibes, remote and ready. 🌈)
  • -f, --file=<file> β€” Use a file with SPARQL content to query or update. (File-based, no cap. πŸ“)
  • -u, --update β€” This has to be used with --query. This tells tinysparql query to use the SPARQL update extensions so it knows it isn’t a regular data lookup request. So if your query is intended to change data in the database, this option is needed. (Translation: if you're about to change data, you need this flag. Don't skip it. πŸ’€)
  • -a, --arg=<parameter>:<value> β€” Provides an argument for a parameter declared in the SPARQL query string. This may be used with --file, --query or --update. Multiple arguments may be provided for multiple parameters. Argument values are provided as a colon separated string containing 3 values: name, type and value. The name is the same as used in the query string, the value is the desired value, and the type is a single-character string defining the type:
    • i β€” The value will describe an integer
    • d β€” The value will describe a floating point number
    • b β€” The value will describe a boolean
    • s β€” The value will describe a plain string

(Each one slaps, bestie. Just match the type to your value and you're golden. πŸ’–)

πŸ”₯ 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 πŸ‘‘

(Check these out bestie, they're giving "I want to learn more" energy. πŸ’œ)


That's the whole vibe, bestie. This page is from version 3.12.0, dated 09/15/2026. Now go query something iconic. πŸ’…βœ¨

πŸ“¦ where this page comes from