Re: Having arq accept stdin as alternative to --data parameter?

2021-02-28 Thread Andy Seaborne
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

Re: Having arq accept stdin as alternative to --data parameter?

2021-02-27 Thread Bob DuCharme
riot does it nicely. That's what inspired me to request that arq do it. Thanks, Bob On 2/27/21 5:01 PM, Colin Gross wrote: Bob, Yes. I mistakenly tested passing stdin as the --query argument. The --data argument apparently keys the input type from the suffix of the filename. That makes

Re: Having arq accept stdin as alternative to --data parameter?

2021-02-27 Thread Colin Gross
Bob, Yes. I mistakenly tested passing stdin as the --query argument. The --data argument apparently keys the input type from the suffix of the filename. That makes it a bit more of a pain to deal with. #!/bin/sh # Write some sample data. cat << DATADOC > /tmp/data.n3 @prefix :

Re: Having arq accept stdin as alternative to --data parameter?

2021-02-27 Thread Bob DuCharme
That looked promising to me, but with Jena 3.3 under Ubuntu it gave me "Failed to load data". Wouldn't there need to be some way to indicate which serialization the data was using? Thanks, Bob On 2/27/21 2:47 PM, Colin Gross wrote: Bob, Have you tried passing /dev/stdin as the argument

Re: Having arq accept stdin as alternative to --data parameter?

2021-02-27 Thread Colin Gross
Bob, Have you tried passing /dev/stdin as the argument for --data? E.g: arq --query=example.rq --data=/dev/stdin That should wait on stdin until it hits EOF (ctrl+d). This should let you piping from a file or wherever E.g. cat people.n3 | arq --query=example.rq --data=/dev/stdin If you need to

Having arq accept stdin as alternative to --data parameter?

2021-02-27 Thread Bob DuCharme
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