Selectively import RDF into prolog

Dear SWI prolog community

I am interested in importing an RDF source (RDF statements) from an RDF(S) repository into prolog.

Since the repository is quite huge, and I only need some few values out of that RDF repository,
I would not want to import all the RDF statements at a glance into Prolog, then throw away 99% of them in order to keep what I need. I would rather like to be able to selectively import some few triples out of many from an RDF repository.

(I am just thinking at formulating a SPARQL-Select into a URL and to import from that URL).

Is there a (-nother) way to do that (better) in SWI-Prolog?

discovered https://eu.swi-prolog.org/pldoc/man?section=sparqlclient#