TINYSPARQL-SQL(1)

🌸 NAME 🌸

okay bestie, this is TINYSPARQL-SQL(1) from the TinySPARQL manual β€” the moment where we use SQL to query the TinySPARQL databases πŸ’…βœ¨

πŸ¦‹ SYNOPSIS πŸ¦‹

tinysparql sql -q <sql> | -f <file>

πŸŽ€ DESCRIPTION πŸŽ€

So this command literally lets you probe the current database πŸ‘€. When you use commands like tinysparql sparql, the SPARQL used is translated into SQL before being run on the database. That means this command lets you use the database directly with SQL and avoid the SPARQL engine entirely β€” iconic behavior tbh πŸ”₯.

The caller can run a query two ways, bestie:

  • by providing a file with the query, or
  • by providing a string with the sql query.

The file argument can be either a local path or a URI. It also does not have to be an absolute path. Slay for flexibility 🫢.

✨ OPTIONS ✨

  • -f, --file=<file> β€” Use a file with SPARQL content to query. Don’t forget to end all queries with a semicolon (;) and also to use quotes around table names. The quotes are important because most tables are named after ontology classes like "nfo:Document" and queries will fail without the quotes. This is highkey essential, don’t skip the quotes πŸ’€.
  • -q, --query=<sql> β€” Use a sql string to query the database with.

🌈 EXAMPLES 🌈

Show first 10 "nfo:Document" entries where the TOC is not NULL:

$ tinysparql sql -q 'SELECT * FROM "nfo:Document" WHERE "nfo:tableOfContents" NOT NULL LIMIT 10;'

πŸ”— SEE ALSO πŸ”—


mwah πŸ’‹ this page is version 3.12.0, dated 09/15/2026, and it’s literally TINYSPARQL-SQL(1) β€” periodt πŸ’œ

πŸ“¦ where this page comes from