Piping bzip2 output into tdbloader2 (apache-jena) gives “File does not exist”












0















I want to pipe the output from bzip2 and use it as an input to fill a TDB database using tbdloader2 from apache-jena-3.9.0.



I already found
Generating TDB Dataset from archive containing N-TRIPLES files
but the proposed solution there did not work for me.



bzip2 -dc test.ttl.bz2 | tdbloader2 --loc=/pathto/TDBdatabase_test -- -


produces



20:08:01 INFO -- TDB Bulk Loader Start
20:08:01 INFO Data Load Phase
20:08:01 INFO Got 1 data files to load
20:08:01 INFO Data file 1: /home/user/-
File does not exist: /home/user/-
20:08:01 ERROR Failed during data phase


Similar results I got with with (inspired by https://unix.stackexchange.com/questions/16990/using-data-read-from-a-pipe-instead-than-from-a-file-in-command-options)



bzip2 -dc test.ttl.bz2 | tdbloader2 --loc=/pathto/TDBdatabase_test /dev/stdin 
20:34:45 INFO -- TDB Bulk Loader Start
20:34:45 INFO Data Load Phase
20:34:45 INFO Got 1 data files to load
20:34:45 INFO Data file 1: /proc/16256/fd/pipe:[92062]
File does not exist: /proc/16256/fd/pipe:[92062]
20:34:45 ERROR Failed during data phase


and



bzip2 -dc test.ttl.bz2 | tdbloader2 --loc=/pathto/TDBdatabase_test /dev/fd/0 
20:34:52 INFO -- TDB Bulk Loader Start
20:34:52 INFO Data Load Phase
20:34:52 INFO Got 1 data files to load
20:34:52 INFO Data file 1: /proc/16312/fd/pipe:[97432]
File does not exist: /proc/16312/fd/pipe:[97432]
20:34:52 ERROR Failed during data phase


unpacking the bz2 file manually and then adding it works fine:



bzip2 -d test.ttl.bz2
tdbloader2 --loc=/pathto/TDBdatabase_test test.ttl


Would be great if someone could point me in the right direction.










share|improve this question


















  • 1





    Your question is better suited to Super User. Stack Overflow is a question and answer site for professional and enthusiast programmers.

    – Cyrus
    Nov 25 '18 at 15:12


















0















I want to pipe the output from bzip2 and use it as an input to fill a TDB database using tbdloader2 from apache-jena-3.9.0.



I already found
Generating TDB Dataset from archive containing N-TRIPLES files
but the proposed solution there did not work for me.



bzip2 -dc test.ttl.bz2 | tdbloader2 --loc=/pathto/TDBdatabase_test -- -


produces



20:08:01 INFO -- TDB Bulk Loader Start
20:08:01 INFO Data Load Phase
20:08:01 INFO Got 1 data files to load
20:08:01 INFO Data file 1: /home/user/-
File does not exist: /home/user/-
20:08:01 ERROR Failed during data phase


Similar results I got with with (inspired by https://unix.stackexchange.com/questions/16990/using-data-read-from-a-pipe-instead-than-from-a-file-in-command-options)



bzip2 -dc test.ttl.bz2 | tdbloader2 --loc=/pathto/TDBdatabase_test /dev/stdin 
20:34:45 INFO -- TDB Bulk Loader Start
20:34:45 INFO Data Load Phase
20:34:45 INFO Got 1 data files to load
20:34:45 INFO Data file 1: /proc/16256/fd/pipe:[92062]
File does not exist: /proc/16256/fd/pipe:[92062]
20:34:45 ERROR Failed during data phase


and



bzip2 -dc test.ttl.bz2 | tdbloader2 --loc=/pathto/TDBdatabase_test /dev/fd/0 
20:34:52 INFO -- TDB Bulk Loader Start
20:34:52 INFO Data Load Phase
20:34:52 INFO Got 1 data files to load
20:34:52 INFO Data file 1: /proc/16312/fd/pipe:[97432]
File does not exist: /proc/16312/fd/pipe:[97432]
20:34:52 ERROR Failed during data phase


unpacking the bz2 file manually and then adding it works fine:



bzip2 -d test.ttl.bz2
tdbloader2 --loc=/pathto/TDBdatabase_test test.ttl


Would be great if someone could point me in the right direction.










share|improve this question


















  • 1





    Your question is better suited to Super User. Stack Overflow is a question and answer site for professional and enthusiast programmers.

    – Cyrus
    Nov 25 '18 at 15:12
















0












0








0








I want to pipe the output from bzip2 and use it as an input to fill a TDB database using tbdloader2 from apache-jena-3.9.0.



I already found
Generating TDB Dataset from archive containing N-TRIPLES files
but the proposed solution there did not work for me.



bzip2 -dc test.ttl.bz2 | tdbloader2 --loc=/pathto/TDBdatabase_test -- -


produces



20:08:01 INFO -- TDB Bulk Loader Start
20:08:01 INFO Data Load Phase
20:08:01 INFO Got 1 data files to load
20:08:01 INFO Data file 1: /home/user/-
File does not exist: /home/user/-
20:08:01 ERROR Failed during data phase


Similar results I got with with (inspired by https://unix.stackexchange.com/questions/16990/using-data-read-from-a-pipe-instead-than-from-a-file-in-command-options)



bzip2 -dc test.ttl.bz2 | tdbloader2 --loc=/pathto/TDBdatabase_test /dev/stdin 
20:34:45 INFO -- TDB Bulk Loader Start
20:34:45 INFO Data Load Phase
20:34:45 INFO Got 1 data files to load
20:34:45 INFO Data file 1: /proc/16256/fd/pipe:[92062]
File does not exist: /proc/16256/fd/pipe:[92062]
20:34:45 ERROR Failed during data phase


and



bzip2 -dc test.ttl.bz2 | tdbloader2 --loc=/pathto/TDBdatabase_test /dev/fd/0 
20:34:52 INFO -- TDB Bulk Loader Start
20:34:52 INFO Data Load Phase
20:34:52 INFO Got 1 data files to load
20:34:52 INFO Data file 1: /proc/16312/fd/pipe:[97432]
File does not exist: /proc/16312/fd/pipe:[97432]
20:34:52 ERROR Failed during data phase


unpacking the bz2 file manually and then adding it works fine:



bzip2 -d test.ttl.bz2
tdbloader2 --loc=/pathto/TDBdatabase_test test.ttl


Would be great if someone could point me in the right direction.










share|improve this question














I want to pipe the output from bzip2 and use it as an input to fill a TDB database using tbdloader2 from apache-jena-3.9.0.



I already found
Generating TDB Dataset from archive containing N-TRIPLES files
but the proposed solution there did not work for me.



bzip2 -dc test.ttl.bz2 | tdbloader2 --loc=/pathto/TDBdatabase_test -- -


produces



20:08:01 INFO -- TDB Bulk Loader Start
20:08:01 INFO Data Load Phase
20:08:01 INFO Got 1 data files to load
20:08:01 INFO Data file 1: /home/user/-
File does not exist: /home/user/-
20:08:01 ERROR Failed during data phase


Similar results I got with with (inspired by https://unix.stackexchange.com/questions/16990/using-data-read-from-a-pipe-instead-than-from-a-file-in-command-options)



bzip2 -dc test.ttl.bz2 | tdbloader2 --loc=/pathto/TDBdatabase_test /dev/stdin 
20:34:45 INFO -- TDB Bulk Loader Start
20:34:45 INFO Data Load Phase
20:34:45 INFO Got 1 data files to load
20:34:45 INFO Data file 1: /proc/16256/fd/pipe:[92062]
File does not exist: /proc/16256/fd/pipe:[92062]
20:34:45 ERROR Failed during data phase


and



bzip2 -dc test.ttl.bz2 | tdbloader2 --loc=/pathto/TDBdatabase_test /dev/fd/0 
20:34:52 INFO -- TDB Bulk Loader Start
20:34:52 INFO Data Load Phase
20:34:52 INFO Got 1 data files to load
20:34:52 INFO Data file 1: /proc/16312/fd/pipe:[97432]
File does not exist: /proc/16312/fd/pipe:[97432]
20:34:52 ERROR Failed during data phase


unpacking the bz2 file manually and then adding it works fine:



bzip2 -d test.ttl.bz2
tdbloader2 --loc=/pathto/TDBdatabase_test test.ttl


Would be great if someone could point me in the right direction.







bash pipe jena






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 25 '18 at 15:09









markusmarkus

31




31








  • 1





    Your question is better suited to Super User. Stack Overflow is a question and answer site for professional and enthusiast programmers.

    – Cyrus
    Nov 25 '18 at 15:12
















  • 1





    Your question is better suited to Super User. Stack Overflow is a question and answer site for professional and enthusiast programmers.

    – Cyrus
    Nov 25 '18 at 15:12










1




1





Your question is better suited to Super User. Stack Overflow is a question and answer site for professional and enthusiast programmers.

– Cyrus
Nov 25 '18 at 15:12







Your question is better suited to Super User. Stack Overflow is a question and answer site for professional and enthusiast programmers.

– Cyrus
Nov 25 '18 at 15:12














1 Answer
1






active

oldest

votes


















1














tdbloader2 accepts bz2 compressed files on the command line:



tdbloader2 --loc=/pathto/TDBdatabase_test test.ttl.bz2


It doesn't accept input from a pipe - and if it did, then it would not know the syntax is Turtle which it gets from the file extension.






share|improve this answer
























  • thank you. works. I didn't think about it as feeding zipped files didn't work when using fuseki.

    – markus
    Nov 26 '18 at 3:29











  • bz2 and gz are a single file compression tools; zip is an archive where the individual entries have separate names. c.f. tar The names matter for reading files to get the syntax. zip files could be supported; it is unpacking and reading each file but the base URI is going to be weird. (yes, gz can have several files, but it isn't an archive as such.)

    – AndyS
    Nov 26 '18 at 9:40













Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53468838%2fpiping-bzip2-output-into-tdbloader2-apache-jena-gives-file-does-not-exist%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














tdbloader2 accepts bz2 compressed files on the command line:



tdbloader2 --loc=/pathto/TDBdatabase_test test.ttl.bz2


It doesn't accept input from a pipe - and if it did, then it would not know the syntax is Turtle which it gets from the file extension.






share|improve this answer
























  • thank you. works. I didn't think about it as feeding zipped files didn't work when using fuseki.

    – markus
    Nov 26 '18 at 3:29











  • bz2 and gz are a single file compression tools; zip is an archive where the individual entries have separate names. c.f. tar The names matter for reading files to get the syntax. zip files could be supported; it is unpacking and reading each file but the base URI is going to be weird. (yes, gz can have several files, but it isn't an archive as such.)

    – AndyS
    Nov 26 '18 at 9:40


















1














tdbloader2 accepts bz2 compressed files on the command line:



tdbloader2 --loc=/pathto/TDBdatabase_test test.ttl.bz2


It doesn't accept input from a pipe - and if it did, then it would not know the syntax is Turtle which it gets from the file extension.






share|improve this answer
























  • thank you. works. I didn't think about it as feeding zipped files didn't work when using fuseki.

    – markus
    Nov 26 '18 at 3:29











  • bz2 and gz are a single file compression tools; zip is an archive where the individual entries have separate names. c.f. tar The names matter for reading files to get the syntax. zip files could be supported; it is unpacking and reading each file but the base URI is going to be weird. (yes, gz can have several files, but it isn't an archive as such.)

    – AndyS
    Nov 26 '18 at 9:40
















1












1








1







tdbloader2 accepts bz2 compressed files on the command line:



tdbloader2 --loc=/pathto/TDBdatabase_test test.ttl.bz2


It doesn't accept input from a pipe - and if it did, then it would not know the syntax is Turtle which it gets from the file extension.






share|improve this answer













tdbloader2 accepts bz2 compressed files on the command line:



tdbloader2 --loc=/pathto/TDBdatabase_test test.ttl.bz2


It doesn't accept input from a pipe - and if it did, then it would not know the syntax is Turtle which it gets from the file extension.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 25 '18 at 22:19









AndySAndyS

12.9k1118




12.9k1118













  • thank you. works. I didn't think about it as feeding zipped files didn't work when using fuseki.

    – markus
    Nov 26 '18 at 3:29











  • bz2 and gz are a single file compression tools; zip is an archive where the individual entries have separate names. c.f. tar The names matter for reading files to get the syntax. zip files could be supported; it is unpacking and reading each file but the base URI is going to be weird. (yes, gz can have several files, but it isn't an archive as such.)

    – AndyS
    Nov 26 '18 at 9:40





















  • thank you. works. I didn't think about it as feeding zipped files didn't work when using fuseki.

    – markus
    Nov 26 '18 at 3:29











  • bz2 and gz are a single file compression tools; zip is an archive where the individual entries have separate names. c.f. tar The names matter for reading files to get the syntax. zip files could be supported; it is unpacking and reading each file but the base URI is going to be weird. (yes, gz can have several files, but it isn't an archive as such.)

    – AndyS
    Nov 26 '18 at 9:40



















thank you. works. I didn't think about it as feeding zipped files didn't work when using fuseki.

– markus
Nov 26 '18 at 3:29





thank you. works. I didn't think about it as feeding zipped files didn't work when using fuseki.

– markus
Nov 26 '18 at 3:29













bz2 and gz are a single file compression tools; zip is an archive where the individual entries have separate names. c.f. tar The names matter for reading files to get the syntax. zip files could be supported; it is unpacking and reading each file but the base URI is going to be weird. (yes, gz can have several files, but it isn't an archive as such.)

– AndyS
Nov 26 '18 at 9:40







bz2 and gz are a single file compression tools; zip is an archive where the individual entries have separate names. c.f. tar The names matter for reading files to get the syntax. zip files could be supported; it is unpacking and reading each file but the base URI is going to be weird. (yes, gz can have several files, but it isn't an archive as such.)

– AndyS
Nov 26 '18 at 9:40






















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53468838%2fpiping-bzip2-output-into-tdbloader2-apache-jena-gives-file-does-not-exist%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Costa Masnaga

Fotorealismo

Sidney Franklin