You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Jindřich Mynarz <my...@gmail.com> on 2013/12/02 13:35:51 UTC

tdbdump specific named graph?

Hi,

is is possible to dump specific named graph from Jena TDB using the
command-line utilities? I remember tdbdump to have a --graph param, but
this is no longer available. Using tdbdump thus only allows to dump the
whole dataset.

If dumping a specific named graph isn't possible, how would you recommend
to split the dump of the whole dataset into multiple files, one per named
graph?

Best,

Jindřich

-- 
Jindřich Mynarz
http://mynarz.net/#jindrich

Re: tdbdump specific named graph?

Posted by Jindřich Mynarz <my...@gmail.com>.
Thanks for the overview of options for dumping specific named graphs.

In my case the best options is to dump the whole dataset and then split the
resulting file per named graph, since the individual named graphs are
larger in size, so getting them via Fuseki's Graph Store API might not be
the best approach.

Best,

Jindřich

-- 
Jindřich Mynarz
http://mynarz.net/#jindrich


On Mon, Dec 2, 2013 at 4:24 PM, Andy Seaborne <an...@apache.org> wrote:

> On 02/12/13 12:35, Jindřich Mynarz wrote:
>
>> Hi,
>>
>> is is possible to dump specific named graph from Jena TDB using the
>> command-line utilities? I remember tdbdump to have a --graph param, but
>> this is no longer available. Using tdbdump thus only allows to dump the
>> whole dataset.
>>
>> If dumping a specific named graph isn't possible, how would you recommend
>> to split the dump of the whole dataset into multiple files, one per named
>> graph?
>>
>> Best,
>>
>> Jindřich
>>
>>
> Yes - tdbdump is a tool to dump the entire database.
>
> You could modify it to dump a single graph (it's quite a simple tool - it
> send the output of a graph.find to a N-Quads formatter).
>
> If you want all graph then it might be better to dump once, then use text
> processing to split up the file.  Matching each line of quads from the tail
> avoids needing to touch the literals.  e.g. <[^>]>\s*.\s*$
>
> If using Fuseki, you can GET each graph using the SPARQL Graph Store
> protocol.
>
>         Andy
>
>

Re: tdbdump specific named graph?

Posted by Andy Seaborne <an...@apache.org>.
On 02/12/13 12:35, Jindřich Mynarz wrote:
> Hi,
>
> is is possible to dump specific named graph from Jena TDB using the
> command-line utilities? I remember tdbdump to have a --graph param, but
> this is no longer available. Using tdbdump thus only allows to dump the
> whole dataset.
>
> If dumping a specific named graph isn't possible, how would you recommend
> to split the dump of the whole dataset into multiple files, one per named
> graph?
>
> Best,
>
> Jindřich
>

Yes - tdbdump is a tool to dump the entire database.

You could modify it to dump a single graph (it's quite a simple tool - 
it send the output of a graph.find to a N-Quads formatter).

If you want all graph then it might be better to dump once, then use 
text processing to split up the file.  Matching each line of quads from 
the tail avoids needing to touch the literals.  e.g. <[^>]>\s*.\s*$

If using Fuseki, you can GET each graph using the SPARQL Graph Store 
protocol.

	Andy