You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Adrian Gschwend <ml...@netlabs.org> on 2018/01/14 12:40:37 UTC

tdbquery: INSERT & graph output format

Hi,

I am using tdbquery in some pipelines I created. Is there a way to use
INSERT statements as well instead of CONSTRUCTS? From the error message
I got I get the impression that it behaves like executing on the query
interface on Fuseki and not the update, so INSERT is not valid in that
context.

Also I couldn't manage to get n-triples back from the construct, it
always returns Turtle. Is there a way to select the graph output format?

regards

Adrian


Re: tdbquery: INSERT & graph output format

Posted by Adrian Gschwend <ml...@netlabs.org>.
On 14.01.18 15:11, Andy Seaborne wrote:

>  tdbquery --loc DB -results=NT 'CONSTRUCT WHERE { ?s ?p ?o}'
> 
> or N-TRIPLES
> 
> (but not the MIME type :-()

ah great tnx, I did try the mime-type writing indeed

regards

Adrian

Re: tdbquery: INSERT & graph output format

Posted by Andy Seaborne <an...@apache.org>.
  tdbquery --loc DB -results=NT 'CONSTRUCT WHERE { ?s ?p ?o}'

or N-TRIPLES

(but not the MIME type :-()

works for me.

     Andy

On 14/01/18 12:49, ajs6f wrote:
> tdbupdate will let you execute SPARQL Update statements.
> 
> Try tdbquery --help and you will see the flags it takes. They include:
> 
> --results=             Results format (Result set: text, XML, JSON, CSV, TSV; Graph: RDF serialization)
> 
> Feel free to send an improvement for https://jena.apache.org/documentation/tdb/commands.html, or I will when I get to it.
> 
> ajs6f
> 
>> On Jan 14, 2018, at 7:40 AM, Adrian Gschwend <ml...@netlabs.org> wrote:
>>
>> Hi,
>>
>> I am using tdbquery in some pipelines I created. Is there a way to use
>> INSERT statements as well instead of CONSTRUCTS? From the error message
>> I got I get the impression that it behaves like executing on the query
>> interface on Fuseki and not the update, so INSERT is not valid in that
>> context.
>>
>> Also I couldn't manage to get n-triples back from the construct, it
>> always returns Turtle. Is there a way to select the graph output format?
>>
>> regards
>>
>> Adrian
>>
> 

Re: tdbquery: INSERT & graph output format

Posted by Adrian Gschwend <ml...@netlabs.org>.
On 14.01.18 13:49, ajs6f wrote:

> Try tdbquery --help and you will see the flags it takes. They include:
> 
> --results=             Results format (Result set: text, XML, JSON, CSV, TSV; Graph: RDF serialization)
> 
> Feel free to send an improvement for https://jena.apache.org/documentation/tdb/commands.html, or I will when I get to it.

thanks a lot, that was helpful! Will document it

regards

Adrian

Re: tdbquery: INSERT & graph output format

Posted by ajs6f <aj...@apache.org>.
tdbupdate will let you execute SPARQL Update statements.

Try tdbquery --help and you will see the flags it takes. They include:

--results=             Results format (Result set: text, XML, JSON, CSV, TSV; Graph: RDF serialization)

Feel free to send an improvement for https://jena.apache.org/documentation/tdb/commands.html, or I will when I get to it.

ajs6f

> On Jan 14, 2018, at 7:40 AM, Adrian Gschwend <ml...@netlabs.org> wrote:
> 
> Hi,
> 
> I am using tdbquery in some pipelines I created. Is there a way to use
> INSERT statements as well instead of CONSTRUCTS? From the error message
> I got I get the impression that it behaves like executing on the query
> interface on Fuseki and not the update, so INSERT is not valid in that
> context.
> 
> Also I couldn't manage to get n-triples back from the construct, it
> always returns Turtle. Is there a way to select the graph output format?
> 
> regards
> 
> Adrian
>