roqet(1)
π roqet(1) β the Rasqal RDF query utility, but make it make sense π
okay bestie, listen up: this is a General Commands Manual page, and the command is literally called roqet. yes, really. it's the Rasqal RDF query utility and it's lowkey iconic once you know what you're doing. let's get into it π¦
β¨ NAME β¨
roqet β the Rasqal RDF query utility. that's it, that's the name, no notes π
π SYNOPSIS π
the many moods of roqet, fr fr:
roqet [OPTIONS] <query-URI> [base-URI]
roqet [OPTIONS]-e query-string [base-URI]
roqet [OPTIONS]-p sparql-protocol-service-URI query-URI [base-URI]
roqet [OPTIONS]-p sparql-protocol-service-URI [-e query-string ] [base-URI]
roqet [OPTIONS]-t query results file [base-URI]
πΈ DESCRIPTION πΈ
so the whole vibe is: roqet lets you query RDF content using the Rasqal RDF query library, and then it prints the results β variable bindings, RDF graph results, or boolean results β in a whole bunch of different formats. it's giving versatility, it's giving options, it's giving "why choose one output format when you can have seventeen" π
the query gets read from query-URI, and if you hand over the optional base-URI, that becomes the base URI of the query. no base-URI? no problem, it's just optional, bestie.
π MAIN OPTIONS π
roqet uses the usual GNU command line syntax β long options start with two dashes (-) if your getopt_long function supports it. if it doesn't? then bestie, only the short options are available. tragic but real π
-e,--execQUERY β run the query string that's sitting right there in the QUERY argument instead of reading the query from a URI. this kicks in when-e/--execis not given, iykyk.-i,--inputLANGUAGE β set the input query LANGUAGE to one of the supported languages. the list includes'sparql'(SPARQL Query Language for RDF β and yes, that's the default),'sparql11', and'laqrs'. the full list of supported languages and subsets shows up in the help summary when you run-h/--help. go look, it's there β¨-p,--protocolSERVICE-URI β call the SPARQL HTTP protocol SERVICE-URI to execute the query instead of running it locally inside the Rasqal query engine. (that local path happens when-eis given, or a query string is given.)-r,--resultsFORMAT β set the query results output FORMAT. and okay, this one has β¨layersβ¨:- for variable bindings, the values of FORMAT depend on what Rasqal supports, but they include
'simple'for a simple text format (default),'xml'for the SPARQL Query Results XML format,'csv'for SPARQL CSV,'tsv'for SPARQL TSV,'rdfxml'and'turtle'for RDF syntax formats, and'json'for a JSON version of the results. - for RDF graph results, the values of FORMAT are
'ntriples'(N-Triples, default),'rdfxml-abbrev'(RDF/XML Abbreviated),'rdfxml'(RDF/XML),'turtle'(Turtle),'json'(RDF/JSON resource centric),'json-triples'(RDF/JSON triples), or'rss-1.0'(RSS 1.0, also an RDF/XML syntax). - the exact list of formats depends on what
libraptor2(3)was built with, but it's given correctly in the usage message with-h. so like, check there before you fight me on it π«Ά
- for variable bindings, the values of FORMAT depend on what Rasqal supports, but they include
-R,--results-input-formatFORMAT β set the query results input FORMAT. this one is for use with-t, and it takes the values'xml'for the SPARQL Query Results XML format,,'csv'for SPARQL CSV,,'tsv'for SPARQL TSV, and'turtle'and'rdfxml'for RDF syntax formats. (yes the double commas are canon, I don't make the rules π)-t,--results-inputFILE β read query results from FILE. that's the whole thing, she's simple, she's efficient, we love her π
π₯ OTHER OPTIONS π₯
-c,--countβ only count the triples and produce no other output. minimalism as a lifestyle β-d,--dump-queryFORMAT β print the parsed query out in a given FORMAT, one of'none'(default),'debug','structure'or'sparql'.-D,--dataURI β add RDF data source URI (not a named graph). and important: if no data sources are given, the query itself must point to the data, like via SPARQLFROMuri statements. so like, one of you has to know where the data is, bestie π-E,--ignore-errorsβ do not print error messages and do not exit with a non-0 status. living in denial, but make it a command-line flag π«Ά-f,--featureNAME(=VALUE) β set query feature NAME to the VALUE, or to integer1if VALUE is omitted. you can see the known features with-f helpor--feature help.-F,--formatNAME β set the data source format NAME for subsequent data graphs called with-D/--dataor-G/--named. if you don't specify it, the default is that the query engine just guesses. the name is a Raptor parser name, fyi.-G,--namedURI β add RDF data source URI (named graph). she's-D's named-graph cousin π-h,--helpβ show a summary of the options. bestie behaviour, honestly.-n,--dryrunβ prepare the query but do not execute it. all dressed up, nowhere to go π-q,--quietβ no extra information messages. peace and quiet, finally.-s,--sourceURI β add RDF data source URI (named graph) URI by adding it to the list of query data source URIs. FORMAT to'simple'(default) or'xml'(an experimental XML format).-v,--versionβ print the rasqal library version and exit. iconic, brief, gone π¨-W,--warningsLEVEL β set the warning LEVEL in the range0(do not warn about anything) to100(show every warning). the Rasqal default is in the middle (50). perfectly balanced, as all things should be βοΈ
π EXAMPLES π
the receipts, let's go:
roqet sparql-query-file.rq
run a SPARQL query contained in the local file sparql-query-file.rq. the data used would be described in FROM statements in the query file. no extra args needed, she just knows πΈ
roqet -q -i sparql http://example.org/sparql-query.rq
run a SPARQL query that's out there on the web at URI http://example.org/sparql-query.rq, without any extra messages (quiet, -q). no cap, that's it π¦
roqet -q query-file.rq http://example.org/base/
run a query (default language SPARQL, as always) from a local file query-file.rq, but use base URI http://example.org/base/ to resolve any relative URIs. teamwork makes the dream work π€
roqet -q -i sparql -r xml http://example.org/sparql-query.rq
run a SPARQL query that's on the web at URI http://example.org/sparql-query.rq and format the results in the SPARQL Query Results XML format, with no extra messages. clean, pretty, done β¨
roqet -i sparql -e 'SELECT * WHERE { ?s ?p ?o }' -D stuff.rdf
run a SPARQL query given right there on the command line against data in the file stuff.rdf. the type of the file will be guessed, and likely it's the format RDF/XML. the classic "just guess, bestie" move π
roqet -t result.srx -r html
read SPARQL query results in the SPARQL Query Results XML format (the default), and print it in HTML. glow-up achieved π
roqet -t result.ttl -R turtle -r csv
read SPARQL query results in RDF/Turtle format and print it in CSV. format in, format out, no drama β
π CONFORMING TO π
this utility conforms to some very serious documents, and I'm listing every single one because we respect the standards in this house π
- SPARQL 1.1 Query Language, Steve Harris and Andy Seaborne (eds), W3C Recommendation, 21 March 2013 β
http://www.w3.org/TR/2013/REC-sparql11-query-20130321/ - SPARQL Query Results XML Format (Second Edition), Sandro Hawke (Second Edition ed), Jeen Broekstra and Dave Beckett (eds), W3C Recommendation, 21 March 2013. β
http://www.w3.org/TR/2013/REC-rdf-sparql-XMLres-20130321/
π«Ά SEE ALSO π«Ά
librasqal(3), libraptor(3) β go read those when you want the deep lore.
π CHANGES π
nothing listed here in the original, bestie. the section is just vibes and a heading. we move on π
π§ AUTHOR π§
Dave Beckett β http://www.dajobe.org/ β thank you for your service, legend π
and that's the whole page!! this one came out on 2013-12-11, and it's page roqet(1) from the General Commands Manual. go query something, you absolute main character πβ¨
π¦ where this page comes from
- alpine 3.24: rasqal-doc 0.9.33-r3 Β· LGPL-2.1-or-later
- centos-stream 9: rasqal 0.9.33-18.el9 Β· LGPLv2+ or ASL 2.0
- centos-stream 9: rasqal 0.9.33-18.el9 Β· LGPLv2+ or ASL 2.0
- debian bookworm: rasqal-utils 0.9.33-2 Β· LGPL-2.1-or-later OR GPL-2.0-or-later OR Apache-2.0+
- debian trixie: rasqal-utils 0.9.33-2.1+b2 Β· LGPL-2.1-or-later OR GPL-2.0-or-later OR Apache-2.0+
- fedora 43: rasqal 0.9.33-31.fc43 Β· LGPL-2.1-or-later OR Apache-2.0
- fedora 43: rasqal 0.9.33-31.fc43 Β· LGPL-2.1-or-later OR Apache-2.0
- fedora 44: rasqal 0.9.33-32.fc44 Β· LGPL-2.1-or-later OR Apache-2.0
- fedora 44: rasqal 0.9.33-32.fc44 Β· LGPL-2.1-or-later OR Apache-2.0
- nixos 26.05: rasqal 0.9.33
- nixpkgs unstable: rasqal 0.9.33
- opensuse-leap 16.0: rasqal 0.9.33-bp160.1.9 Β· Apache-2.0+ OR GPL-2.0-or-later OR LGPL-2.1-or-later
- opensuse-leap 16.0: rasqal 0.9.33-bp160.1.9 Β· Apache-2.0+ OR GPL-2.0-or-later OR LGPL-2.1-or-later
- opensuse-leap 16.0: rasqal 0.9.33-bp160.1.9 Β· Apache-2.0+ OR GPL-2.0-or-later OR LGPL-2.1-or-later
- opensuse-leap 16.0: rasqal 0.9.33-bp160.1.9 Β· Apache-2.0+ OR GPL-2.0-or-later OR LGPL-2.1-or-later
- ubuntu jammy: rasqal-utils 0.9.33-0.2ubuntu1 Β· LGPL-2.1-or-later OR GPL-2.0-or-later OR Apache-2.0+
- ubuntu noble: rasqal-utils 0.9.33-2.1build1 Β· LGPL-2.1-or-later OR GPL-2.0-or-later OR Apache-2.0+
- ubuntu questing: rasqal-utils 0.9.33-2.1build1
- ubuntu resolute: rasqal-utils 0.9.33-3 Β· LGPL-2.1-or-later OR GPL-2.0-or-later OR Apache-2.0+
- ubuntu stonking: rasqal-utils 0.9.33-4 Β· LGPL-2.1-or-later OR GPL-2.0-or-later OR Apache-2.0+
- Copyright (C) 2004-2014 David Beckett - http://www.dajobe.org/
- Copyright (C) 2004-2005 University of Bristol - http://www.bristol.ac.uk/
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms