import .ttl.gz

40 views
Skip to first unread message

Donald Pellegrino

unread,
Sep 3, 2015, 12:55:32 PM9/3/15
to 4store-support
I see in the ImportData documentation that 4s-import will take a --format flag for the triple import format. I found that --format turtle will work on plain text .ttl files. However, I have a large number of gzip compressed .ttl files (.ttl.gz). It is possible to pass those directly into 4s-import without uncompressing them to a staging area as a prerequisite?

swh

unread,
Sep 8, 2015, 5:41:51 AM9/8/15
to 4store-support
I don't think 4s-import will take them directly, but the web interface might... using the appropriate HTTP headers.

Another option would be to pipe into 4s-import, e.g.:

    gzcat file.ttl.gz | 4s-import ... /dev/stdin

You'll have to set the model / graph name manually though, and you can only do one file at a time, which isn't very efficient.

Donald Pellegrino

unread,
Sep 8, 2015, 8:57:14 AM9/8/15
to 4store-support
Thanks for the information. Using gzcat is a useful workaround. The use of gzcat or equivalent flags to gunzip could be easily scripted to handle the case of multiple files. Unfortunately, it seems that adding triples to an existing graph is significantly slower that passing all of the bulk load data into a new graph to be initialized at once. The bulk load performance is a separate issue though so I may post a different thread on that topic.
Reply all
Reply to author
Forward
0 new messages