Seems reasonable and looks doable / not too big a change.
I like the idea of tools being composable.
Andy
Bob - could you raise a JIRA please (you seem to have a JIRA account).
On 27/02/2021 14:41, Bob DuCharme wrote:
This is just an idea. I like how jena's riot utility accepts data from
stdin as long as you provide a --syntax parameter to tell it what
serialization the stdin triples are. When I was at TopQuadrant I liked
SPARQLMotion, their proprietary system for pipelining RDF through
various steps to create an automated workflow. I wrote about doing
something similar with Python in "Pipelining SPARQL queries in memory
with the rdflib Python library" at
http://www.bobdc.com/blog/pipelining-sparql-queries-in-m/ .
<http://www.bobdc.com/blog/pipelining-sparql-queries-in-m/>
I was thinking that if arq could accept triples via stdin like riot can,
I could use curl to pull triples from an endpoint, pipe it to arq
running a CONSTRUCT query that does some cleanup transformations, and
then pipe the output of that to arq to run a SELECT query that pulls
what I ultimately want, all on one command from the command line. (I see
that arq already has a --syntax switch that is about the query itself,
so it would need a different switch to specify the serialization of
input data if it's coming from stdin.)
<http://www.bobdc.com/blog/pipelining-sparql-queries-in-m/>
Of course, I could do all this now from a shell script in which some
lines save output to temporary files and later lines read those, but
supporting stdin would add some flexibility. riot's ability to do this
is inspiring!
Thanks,
Bob