Is this what you are looking for?
QueryExec.constructTriples -> Iterator<Triple>
QueryExecution.execConstructTriples -> Iterator<Triple>
Quads variants also available.
The iterator is streaming if the underlying engine streams the pattern
matching.
Andy
On 13/07/2026 16:34, Enrico.Daga wrote:
Hi all,
There has been a request on SPARQL Anything [1] about trading the uniqueness
guarantee for lower memory footprint. The general argument is that there are
cases where either (a) duplicates are not an issue for the application, but
memory is, or (b) we know by design there will be no duplicates.
Is there a way to let Jena spit out any and all the triples? If there is some
code to write, any pointers to where/how to would be appreciated.
Many thanks,
Enrico
[1] https://github.com/SPARQL-Anything/sparql.anything/issues/635
--
Enrico Daga, PhD
Senior Research Fellow
Knowledge Media Institute
The Open University
http://enridaga.net
http://sparql-anything.cc