1

i need to load a lot of small rdf files into a fuseki database. i'm trying

~ tdbloader2 -l {DB} /data/rdf/*.rdf
bash: /opt/apache-jena-3.1.0/bin/tdbloader2: Argument list too long

better ways to do this?

robert laing
  • 1,331
  • 2
  • 12
  • 19
  • This is an error from the shell. e.g. http://stackoverflow.com/questions/11289551/argument-list-too-long-error-for-rm-cp-mv-commands. – AndyS Jun 20 '16 at 21:28

1 Answers1

2

This is an error from the shell. see for example "Argument list too long error for rm, cp, mv commands".

However, it is a good idea to parse all the files to check they are all valid before trying to bulk load because one error aborts the bulk loader. During checking, you might as well convert to N-triples which loads faster.

Community
  • 1
  • 1
AndyS
  • 16,345
  • 17
  • 21
  • the rdf files are valid, they was checked after generation. not feasible a nt conversion now, too many files. i was thinking to use a `find | xargs` or similar (gnu parallel) but i guess i cannot use anymore *tbloader2*? – robert laing Jun 21 '16 at 08:28
  • How much data is there (in triples)? One way to use the bulk loaders is to read from stdin and stream the contents but that can't be RDF/XMl - it has to be N-Triples or Turtle (those syntaxes are concatenatable, RDF/XML is not). So use xargs to create a stream of RDF content and pipe into "tdbloader -- -". – AndyS Jun 21 '16 at 12:00