1

I want to upload an RDF file using tdbloader.bat (C:\apache-jena-2.10.0\bat, in my case). My turtle file is located in C:\apache-jena-2.10.0, and is named test.ttl. What will be the command line to load the turtle file using tdbloader.bat? After it is loaded, what would be a command line to query with tdbquery.bat?

I have used the following command-

tdbloader.bat -loc c:\apache-jena-2.10.0 test.ttl

But it returned a FileNotFound Exception.

Joshua Taylor
  • 84,998
  • 9
  • 154
  • 353
Som Sarkar
  • 289
  • 1
  • 5
  • 24
  • 1
    Have you tried anything so far? I don't see what you've tried, and what didn't work about it. At any rate, there's an example of using tdbloader and tdbquery in [this answer](http://stackoverflow.com/a/16610663/1281433) to [Querying Open Data Communities Data with SPARQL](http://stackoverflow.com/q/16608265/1281433). – Joshua Taylor Feb 11 '14 at 13:20
  • hi Joshua, I have added the command that I used and the error that I was thrown. Can you please have a check. – Som Sarkar Feb 11 '14 at 14:01
  • 1
    As described in this answer, the `--loc` argument is for specifying the database directory. You've used `-loc` (note the number of the dashes), so that's probably getting treated as a filename. Additionally, `c:\apache-jena-2.10.0 test.ttl` is *two* filenames; shouldn't that be `c:\apache-jena-2.10.0\test.ttl` given your setup? – Joshua Taylor Feb 11 '14 at 14:27
  • @joshua, I changed it to - tdbloader.bat --loc c:\apache-jena-2.10.0\test.ttl, and it gave error saying Not a Directory. Any more help, please? – Som Sarkar Feb 11 '14 at 14:35
  • Yes, as I said, “the `--loc argument is for specifying the database directory”. It's not for specifying the data to load. TDB will read the data to load, and write it in an optimized format to the directory that you specify. This is laid out clearly in the answer I linked to, where the command line was: `tdbloader2 --loc tdb dataset_data_postcodes_20130506183000.nt` The database directory is `tdb` and the file to load is `dataset_data_postcodes_20130506183000.nt`. You can name your database directory whatever you want, and you already have the .ttl file name. – Joshua Taylor Feb 11 '14 at 15:23
  • 2
    That would make your command line something like `tdbloader.bat --loc database-directory-name c:\apache-jena-2.10.0\test.ttl`. – Joshua Taylor Feb 11 '14 at 15:23

1 Answers1

0

The file test.ttl isnt in the same directory as bat files which is causing FileNotFound exception. A correction would be to copy test.ttl to C:\apache-jena-2.10.0\bat. After doing that execute command

tdbloader.bat -loc potato test.ttl.

This would load test.ttl to a folder named potato in same directory as tdbloader.bat. Hope it helps